case down:
if(dateBox.active)
{
- if(key == left) dateValue.day--;
+ if(shownMonth != dateValue.month || shownYear != dateValue.year)
+ {
+ dateValue.month = shownMonth;
+ dateValue.year = shownYear;
+ dateValue.day = 1;
+ }
+ else if(key == left) dateValue.day--;
else if(key == right) dateValue.day++;
else if(key == up) dateValue.day-=7;
else if(key == down) dateValue.day+=7;
return editor ? editor.OnKeyDown(key, ch) : true;
}
};
+
+public class SavingDataBox : DataBox
+{
+ borderStyle = deep;
+ bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
+ {
+ if(!active)
+ {
+ if(!SaveData())
+ Refresh();
+ }
+ return true;
+ }
+
+ bool OnKeyDown(Key key, unichar ch)
+ {
+ if((SmartKey)key == enter)
+ {
+ SaveData();
+ return true;
+ }
+ return DataBox::OnKeyDown(key, ch);
+ }
+}
button.text = text;
};
}
-
-public class SavingDataBox : DataBox
-{
- borderStyle = deep;
- bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
- {
- if(!active)
- {
- if(!SaveData())
- Refresh();
- }
- return true;
- }
-
- bool OnKeyDown(Key key, unichar ch)
- {
- if((SmartKey)key == enter)
- {
- SaveData();
- return true;
- }
- return DataBox::OnKeyDown(key, ch);
- }
-}
editText = true;
anchor = { 0, 0, 0, 0 };
borderStyle = 0;
+ hotKey = f2;
};
if(day || year || month)