From 28c74ff3b4c65be64636d0d679a88acc3fd23f84 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 9 Dec 2009 14:52:07 +0000 Subject: TOLTECS: More work on the menu; started with the saveload menu page and fixed some early bugs --- engines/toltecs/menu.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'engines/toltecs/menu.h') diff --git a/engines/toltecs/menu.h b/engines/toltecs/menu.h index 41541a88e9..2709acf4fc 100644 --- a/engines/toltecs/menu.h +++ b/engines/toltecs/menu.h @@ -86,6 +86,15 @@ enum ItemID { kItemIdDone, kItemIdCancel, // Save/load menu + kItemIdSavegameUp, + kItemIdSavegameDown, + kItemIdSavegame1, + kItemIdSavegame2, + kItemIdSavegame3, + kItemIdSavegame4, + kItemIdSavegame5, + kItemIdSavegame6, + kItemIdSavegame7, // TODO kMenuIdDummy }; @@ -111,14 +120,26 @@ protected: int x, y, w; uint fontNum; }; + + struct SavegameItem { + Common::String _filename; + Common::String _description; + SavegameItem() + : _filename(""), _description("") {} + SavegameItem(Common::String filename, Common::String description) + : _filename(filename), _description(description) {} + }; ToltecsEngine *_vm; Graphics::Surface *_background; MenuID _currMenuID, _newMenuID; ItemID _currItemID; + int _top; + int _savegameListTopIndex; Common::Array _items; + Common::Array _savegames; bool _cfgText, _cfgVoices; int _cfgMasterVolume, _cfgVoicesVolume, _cfgMusicVolume, _cfgSoundFXVolume, _cfgBackgroundVolume; @@ -142,8 +163,12 @@ protected: void saveBackground(); void restoreBackground(); void restoreRect(int x, int y, int w, int h); + void shadeRect(int x, int y, int w, int h, byte color1, byte color2); void drawString(int16 x, int16 y, int w, uint fontNum, byte color, byte *text); - + + void initSavegames(); + void setSavegameCaptions(); + void clickSavegameItem(ItemID id); void setCfgText(bool value, bool active); void setCfgVoices(bool value, bool active); void drawVolumeBar(ItemID itemID); -- cgit v1.2.3