28 #ifndef GAME_MAIN_MENU_H 29 #define GAME_MAIN_MENU_H 31 #include "hpl1/engine/engine.h" 33 #include "hpl1/penumbra-overture/GameTypes.h" 41 eMainMenuState_NewGame,
43 eMainMenuState_Continue,
44 eMainMenuState_Resume,
46 eMainMenuState_LoadGameSpot,
47 eMainMenuState_LoadGameAuto,
48 eMainMenuState_LoadGameFavorite,
50 eMainMenuState_Options,
51 eMainMenuState_OptionsGraphics,
52 eMainMenuState_OptionsGraphicsAdvanced,
53 eMainMenuState_OptionsControls,
54 eMainMenuState_OptionsGame,
55 eMainMenuState_OptionsSound,
56 eMainMenuState_OptionsKeySetupMove,
57 eMainMenuState_OptionsKeySetupAction,
58 eMainMenuState_OptionsKeySetupMisc,
60 eMainMenuState_GraphicsRestart,
62 eMainMenuState_FirstStart,
64 eMainMenuState_LastEnum
74 virtual void OnUpdate(
float afTimeStep) {}
76 virtual void OnDraw() {}
78 virtual void OnMouseDown(eMButton aButton){};
79 virtual void OnMouseUp(eMButton aButton){};
81 virtual void OnDoubleClick(eMButton aButton){};
83 virtual void OnMouseOver(
bool abOver) {}
85 const cRect2f &GetRect() {
return mRect; }
87 virtual void Reset() {}
89 virtual void OnActivate() {}
91 bool IsActive() {
return mbActive; }
92 void SetActive(
bool abX) {
119 eMainMenuState aNextState);
122 void OnUpdate(
float afTimeStep);
124 void OnMouseOver(
bool abOver);
128 virtual void OnMouseDown(eMButton aButton);
129 virtual void OnMouseUp(eMButton aButton){};
143 eMainMenuState mNextState;
153 eMainMenuState aNextState,
cVector2f avFontSize, eFontAlign aAlignment);
156 void OnUpdate(
float afTimeStep);
157 void OnMouseOver(
bool abOver);
160 virtual void OnMouseDown(eMButton aButton);
161 virtual void OnMouseUp(eMButton aButton){};
175 eMainMenuState mNextState;
178 eFontAlign mAlignment;
188 cVector2f avFontSize, eFontAlign aAlignment,
193 void OnMouseDown(eMButton aButton);
194 void OnMouseOver(
bool abOver);
206 eFontAlign mAlignment;
242 void OnUpdate(
float afTimeStep);
243 void OnMouseOver(
bool abOver);
246 void OnMouseDown(eMButton aButton);
247 void OnMouseUp(eMButton aButton);
249 void AddEntry(
const tWString &asText);
252 int GetSelectedIndex() {
return mlSelected; }
253 void SetSelectedIndex(
int alIdx) { mlSelected = alIdx; }
268 float mfSlideButtonSize;
269 float mfSlideButtonPos;
270 bool mbSlideButtonPressed;
271 float mfSlideButtonMove;
278 eFontAlign mAlignment;
296 cVector2f avFontSize, eFontAlign aAlignment,
297 eGameDifficulty aDiffuculty);
299 virtual void OnMouseDown(eMButton aButton);
302 eGameDifficulty mDiffuculty;
311 virtual void OnMouseDown(eMButton aButton);
320 virtual void OnMouseDown(eMButton aButton);
329 virtual void OnMouseDown(eMButton aButton);
360 void OnPostSceneDraw();
364 void Update(
float afTimeStep);
366 void SetButtonTip(
const tWString &asString) { msButtonTip = asString; }
368 void SetMousePos(
const cVector2f &avPos);
369 void AddMousePos(
const cVector2f &avRel);
370 cVector2f GetMousePos() {
return mvMousePos; }
372 void OnMouseDown(eMButton aButton);
373 void OnMouseUp(eMButton aButton);
375 void OnMouseDoubleClick(eMButton aButton);
377 void SetActive(
bool abX);
378 bool IsActive() {
return mbActive; }
384 void SetState(eMainMenuState aState);
388 void InitCheckInput();
389 bool CheckForInput();
391 void ResetWidgets(eMainMenuState aState);
393 void UpdateWidgets() { mbUpdateWidgets =
true; }
396 void DrawBackground();
398 void CreateWidgets();
400 void AddWidgetToState(eMainMenuState aState,
cMainMenuWidget *apWidget);
422 float mfRainDropCount;
436 bool mbUpdateWidgets;
438 eMainMenuState mLastState;
446 eMainMenuState mState;
451 bool mvKeyPressed[Common::KEYCODE_LAST];
452 bool mvMousePressed[eMButton_LastEnum];
457 #endif // GAME_MAIN_MENU_H
Definition: font_data.h:67
Definition: MainMenu.h:185
Definition: GraphicsDrawer.h:77
Definition: MainMenu.h:150
Definition: MainMenu.h:69
Definition: MainMenu.h:217
Definition: GfxObject.h:38
Definition: Updateable.h:35
Definition: MainMenu.h:116
Definition: MainMenu.h:293
Definition: MainMenu.h:316
Definition: list_intern.h:51
Definition: MainMenu.h:351
Definition: MainMenu.h:339
Definition: MainMenu.h:235
Definition: MainMenu.h:307
Definition: MainMenu.h:325