#include <PalmOS.h>
#include <unix_stdlib.h>
#include <palmutils.h>
#include <simcity.h>
#include <simcity_resconsts.h>
#include <globals.h>
#include <logging.h>
#include <ui.h>
#include <simulation.h>
#include <sections.h>
#include <budget.h>
#include <stddef.h>
#include <resCompat.h>
#include <repeathandler.h>
Go to the source code of this file.
Data Structures | |
struct | updateentity |
A collection of all the labels and their related items. More... | |
Defines | |
#define | ENTITY_COUNT (sizeof (entity) / sizeof (entity[0])) |
count of budget number entities | |
Functions | |
FormPtr | budgetSetup (FormPtr form) BUDGET_SECTION |
Set up the budget form. | |
void | dealRepeats (EventPtr event) BUDGET_SECTION |
deal with the repeat event | |
void | dealFieldContentChange (UInt16 fieldID) BUDGET_SECTION |
deal with the manual change of the contents of a field | |
void | updateBudgetValue (FormPtr form, UInt16 label, const Char *format, long value) BUDGET_SECTION |
update the value of a budget number field. | |
void | updateBudgetNumber (BudgetNumber bn) BUDGET_SECTION |
void | post_fieldhandler (UInt16 field, buttonmapping_t *map, Int32 newValue) BUDGET_SECTION |
deal with the new value that has been passed into a structure | |
Boolean | hBudget (EventPtr event) |
Handler for the budget form. | |
Variables | |
buttonmapping_t | budget_map [] |
button mapping for the spinners | |
const struct updateentity | entity [] |
A collection of all the labels and their related items. |
This code deals with the code for the budget form from the pocketcity application
Definition in file budget.c.
|
Set up the budget form.
Definition at line 243 of file budget.c. References BudgetGetNumber(), updateentity::formatstr, GetObjectPtr(), updateentity::item, updateentity::label, UInt16, and updateBudgetValue(). Referenced by hBudget(). |
|
deal with the manual change of the contents of a field
Definition at line 78 of file budget.c. References post_fieldhandler(), processRepeater(), and UInt16. Referenced by hBudget(). |
|
deal with the repeat event
Definition at line 67 of file budget.c. References post_fieldhandler(), processRepeater(), and UInt16. Referenced by hBudget(). |
|
Handler for the budget form. Takes care of events directed at the form. Definition at line 86 of file budget.c. References budgetSetup(), dealFieldContentChange(), dealRepeats(), formID_pocketCity, UIGotoForm(), and UInt16. |
|
deal with the new value that has been passed into a structure
Definition at line 52 of file budget.c. References BudgetNumber, Int32, buttonmapping_tag::special1, buttonmapping_tag::special2, UInt16, UInt8, and updateBudgetNumber(). Referenced by dealFieldContentChange(), and dealRepeats(). |
|
\update the field in question
Definition at line 214 of file budget.c. References BudgetGetNumber(), BudgetNumber, updateentity::formatstr, updateentity::item, updateentity::label, and updateBudgetValue(). Referenced by post_fieldhandler(). |
|
update the value of a budget number field. Scales the number with the K,M... scaling.
Definition at line 197 of file budget.c. References Char, scaleNumber(), UInt16, and UInt32. Referenced by budgetSetup(), and updateBudgetNumber(). |
|
Initial value: { { rbutton_taxdown, rbutton_taxup, fieldID_taxrate, 0, 20, bnIncome, offsetof(GameStruct, tax) }, { rbutton_trafdown, rbutton_trafup, fieldID_budget_tra, 0, 100, bnTraffic, offsetof(GameStruct, upkeep[0]) }, { rbutton_powdown, rbutton_powup, fieldID_budget_pow, 0, 100, bnPower, offsetof(GameStruct, upkeep[1]) }, { rbutton_defdown, rbutton_defup, fieldID_budget_def, 0, 100, bnDefence, offsetof(GameStruct, upkeep[2]) }, { 0, 0, 0, 0, 0, 0, 0 } }
|
|
A collection of all the labels and their related items. Shrinks the code and makes it more consistent. |