Ticket #8925: common-load_v3b.patch
File common-load_v3b.patch, 24.5 KB (added by , 15 years ago) |
---|
-
engines/agi/detection.cpp
2134 2134 return 2135 2135 (f == kSupportsRTL) || 2136 2136 (f == kSupportsListSaves) || 2137 (f == kSupports DirectLoad) ||2137 (f == kSupportsLoadingDuringStartup) || 2138 2138 (f == kSupportsDeleteSave); 2139 2139 } 2140 2140 -
engines/cine/detection.cpp
541 541 return 542 542 (f == kSupportsRTL) || 543 543 (f == kSupportsListSaves) || 544 (f == kSupports DirectLoad);544 (f == kSupportsLoadingDuringStartup); 545 545 } 546 546 547 547 bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { -
engines/dialogs.cpp
34 34 #include "gui/about.h" 35 35 #include "gui/eval.h" 36 36 #include "gui/newgui.h" 37 #include "gui/launcher.h" 37 38 #include "gui/ListWidget.h" 38 39 #include "gui/theme.h" 39 40 … … 95 96 96 97 new GUI::ButtonWidget(this, "globalmain_resume", "Resume", kPlayCmd, 'P'); 97 98 98 // new GUI::ButtonWidget(this, "globalmain_load", "Load", kLoadCmd, 'L'); 99 // new GUI::ButtonWidget(this, "globalmain_save", "Save", kSaveCmd, 'S'); 99 _saveButton = new GUI::ButtonWidget(this, "globalmain_save", "Save", kSaveCmd, 'S'); 100 _saveButton->setVisible(_engine->hasFeature(MetaEngine::kSupportsListSaves) && 101 _engine->hasFeature(MetaEngine::kSupportsSavingDuringRuntime)); 100 102 101 new GUI::ButtonWidget(this, "globalmain_options", "Options", kOptionsCmd, 'O'); 103 _loadButton = new GUI::ButtonWidget(this, "globalmain_load", "Load", kLoadCmd, 'L'); 104 _loadButton->setVisible(_engine->hasFeature(MetaEngine::kSupportsListSaves) && 105 _engine->hasFeature(MetaEngine::kSupportsLoadingDuringRuntime)); 102 106 103 new GUI::ButtonWidget(this, "globalmain_about", "About", kAboutCmd, 'A');107 _optionsButton = new GUI::ButtonWidget(this, "globalmain_options", "Options", kOptionsCmd, 'O'); 104 108 109 _aboutButton = new GUI::ButtonWidget(this, "globalmain_about", "About", kAboutCmd, 'A'); 110 105 111 _rtlButton = new GUI::ButtonWidget(this, "globalmain_rtl", "Return to Launcher", kRTLCmd, 'R'); 106 112 _rtlButton->setEnabled(_engine->hasFeature(MetaEngine::kSupportsRTL)); 107 113 114 _quitButton = new GUI::ButtonWidget(this, "globalmain_quit", "Quit", kQuitCmd, 'Q'); 108 115 109 new GUI::ButtonWidget(this, "globalmain_quit", "Quit", kQuitCmd, 'Q');110 111 116 _aboutDialog = new GUI::AboutDialog(); 112 117 _optionsDialog = new ConfigDialog(); 118 _loadDialog = new GUI::SaveLoadChooser("Load game:", "Load"); 119 120 int scummmainVAddOff = g_gui.evaluator()->getVar("scummmainVAddOff"); 121 122 // Shift buttons depending if the Save/Load buttons are visible 123 if (!_saveButton->isVisible()) { 124 _loadButton->setY(_loadButton->getY() - _loadButton->getHeight() - scummmainVAddOff); 125 _optionsButton->setY(_optionsButton->getY() - _optionsButton->getHeight() - scummmainVAddOff); 126 _aboutButton->setY(_aboutButton->getY() - _aboutButton->getHeight() - scummmainVAddOff); 127 _rtlButton->setY(_rtlButton->getY() - _rtlButton->getHeight() - scummmainVAddOff); 128 _quitButton->setY(_quitButton->getY() - _quitButton->getHeight() - scummmainVAddOff); 129 } 130 131 if (!_loadButton->isVisible()) { 132 _saveButton->setY(_saveButton->getY() - _saveButton->getHeight() - scummmainVAddOff); 133 _optionsButton->setY(_optionsButton->getY() - _optionsButton->getHeight() - scummmainVAddOff); 134 _aboutButton->setY(_aboutButton->getY() - _aboutButton->getHeight() - scummmainVAddOff); 135 _rtlButton->setY(_rtlButton->getY() - _rtlButton->getHeight() - scummmainVAddOff); 136 _quitButton->setY(_quitButton->getY() - _quitButton->getHeight() - scummmainVAddOff); 137 } 113 138 } 114 139 115 140 MainMenuDialog::~MainMenuDialog() { 116 141 delete _aboutDialog; 117 142 delete _optionsDialog; 143 delete _loadDialog; 144 //delete _saveDialog; 118 145 } 119 146 120 147 void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { … … 122 149 case kPlayCmd: 123 150 close(); 124 151 break; 152 case kLoadCmd: 153 { 154 String gameId = ConfMan.get("gameid"); 155 156 const EnginePlugin *plugin = 0; 157 EngineMan.findGame(gameId, &plugin); 158 159 int slot = _loadDialog->runModal(plugin, ConfMan.getActiveDomainName()); 160 161 if (slot >= 0) { 162 _engine->loadGameState(slot); 163 close(); 164 } 165 166 } 167 break; 168 case kSaveCmd: 169 /* 170 String gameId = ConfMan.get("gameid"); 171 172 const EnginePlugin *plugin = 0; 173 EngineMan.findGame(gameId, &plugin); 174 175 int slot = _saveDialog->runModal(plugin, ConfMan.getActiveDomainName()); 176 177 if (slot >= 0) { 178 _engine->saveGameState(slot); 179 close(); 180 } 181 182 } 183 */ 184 break; 125 185 case kOptionsCmd: 126 186 _optionsDialog->runModal(); 127 187 break; … … 148 208 } 149 209 150 210 void MainMenuDialog::reflowLayout() { 211 _loadButton->setEnabled(_engine->canLoadGameStateCurrently()); 212 _saveButton->setEnabled(_engine->canSaveGameStateCurrently()); 213 151 214 #ifndef DISABLE_FANCY_THEMES 152 215 if (g_gui.evaluator()->getVar("global_logo.visible") == 1 && g_gui.theme()->supportsImages()) { 153 216 if (!_logo) -
engines/dialogs.h
27 27 28 28 #include "common/str.h" 29 29 #include "gui/dialog.h" 30 #include "gui/launcher.h" 30 31 #include "gui/options.h" 31 32 #include "gui/widget.h" 32 33 … … 55 56 Engine *_engine; 56 57 57 58 GUI::GraphicsWidget *_logo; 59 GUI::ButtonWidget *_saveButton; 60 GUI::ButtonWidget *_loadButton; 61 GUI::ButtonWidget *_optionsButton; 62 GUI::ButtonWidget *_aboutButton; 58 63 GUI::ButtonWidget *_rtlButton; 64 GUI::ButtonWidget *_quitButton; 59 65 GUI::Dialog *_aboutDialog; 60 66 GUI::Dialog *_optionsDialog; 67 GUI::SaveLoadChooser *_loadDialog; 61 68 62 69 }; 63 70 -
engines/engine.cpp
243 243 _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech); 244 244 } 245 245 246 int Engine::loadGameState(int slot) { 247 // Do nothing by default 248 return 0; 249 } 250 251 bool Engine::canLoadGameStateCurrently() { 252 // Do not allow loading by default 253 return false; 254 } 255 256 int Engine::saveGameState(int slot) { 257 // Do nothing by default 258 return 0; 259 } 260 261 bool Engine::canSaveGameStateCurrently() { 262 // Do not allow saving by default 263 return false; 264 } 265 246 266 void Engine::quitGame() { 247 267 Common::Event event; 248 268 -
engines/engine.h
128 128 */ 129 129 virtual void syncSoundSettings(); 130 130 131 /** 132 *Load a game state 133 */ 134 virtual int loadGameState(int slot); 135 136 /** 137 *Indicates whether a game state can be loaded 138 */ 139 virtual bool canLoadGameStateCurrently(); 140 141 /** 142 *Save a game state 143 */ 144 virtual int saveGameState(int slot); 145 146 /** 147 *Indicates whether a game state can be saved 148 */ 149 virtual bool canSaveGameStateCurrently(); 150 131 151 protected: 132 152 133 153 /** … … 185 205 */ 186 206 bool hasFeature(MetaEngine::MetaEngineFeature f); 187 207 188 public:189 190 208 /** On some systems, check if the game appears to be run from CD. */ 191 209 void checkCD(); 192 210 … … 196 214 * Indicate whether an autosave should be performed. 197 215 */ 198 216 bool shouldPerformAutoSave(int lastSaveTime); 199 200 217 }; 201 218 202 219 extern Engine *g_engine; -
engines/igor/igor.h
427 427 void dialogueReplyToQuestion(int x, int y, int r, int g, int b, int reply = 0); 428 428 429 429 void saveOrLoadGameState(TypeSerializer &typeSerializer); 430 voidloadGameState(int slot);431 voidsaveGameState(int slot);430 int loadGameState(int slot); 431 int saveGameState(int slot); 432 432 void generateGameStateFileName(int num, char *dst, int len) const; 433 433 434 434 MidiPlayer *_midiPlayer; -
engines/igor/saveload.cpp
156 156 } 157 157 } 158 158 159 voidIgorEngine::loadGameState(int slot) {159 int IgorEngine::loadGameState(int slot) { 160 160 char name[64]; 161 161 generateGameStateFileName(slot, name, 63); 162 162 Common::InSaveFile *isf = _saveFileMan->openForLoading(name); … … 175 175 } 176 176 debug(0, "Loaded state, current part %d", _currentPart); 177 177 } 178 179 return 0; // TODO: return success/failure 178 180 } 179 181 180 voidIgorEngine::saveGameState(int slot) {182 int IgorEngine::saveGameState(int slot) { 181 183 char name[64]; 182 184 generateGameStateFileName(slot, name, 63); 183 185 Common::OutSaveFile *osf = _saveFileMan->openForSaving(name); … … 187 189 saveOrLoadGameState(ts); 188 190 delete osf; 189 191 } 192 193 return 0; // TODO: return success/failure 190 194 } 191 195 192 196 void IgorEngine::generateGameStateFileName(int num, char *dst, int len) const { -
engines/kyra/detection.cpp
1075 1075 return 1076 1076 (f == kSupportsRTL) || 1077 1077 (f == kSupportsListSaves) || 1078 (f == kSupports DirectLoad) ||1078 (f == kSupportsLoadingDuringStartup) || 1079 1079 (f == kSupportsDeleteSave) || 1080 1080 (f == kSavesSupportMetaInfo) || 1081 1081 (f == kSavesSupportThumbnail); -
engines/lure/detection.cpp
195 195 return 196 196 (f == kSupportsRTL) || 197 197 (f == kSupportsListSaves) || 198 (f == kSupports DirectLoad) ||198 (f == kSupportsLoadingDuringStartup) || 199 199 (f == kSupportsDeleteSave); 200 200 } 201 201 -
engines/metaengine.h
148 148 /** 149 149 * Loading from the Launcher / command line (-x) 150 150 */ 151 kSupports DirectLoad,151 kSupportsLoadingDuringStartup, 152 152 153 153 /** 154 154 * Deleting Saves from the Launcher (i.e. implements the … … 183 183 * the game till the save. 184 184 * This flag may only be set when 'kSavesSupportMetaInfo' is set. 185 185 */ 186 kSavesSupportPlayTime 186 kSavesSupportPlayTime, 187 188 /** 189 *Features loading from the Common ScummVM options dialog in-game 190 */ 191 kSupportsLoadingDuringRuntime, 192 193 /** 194 *Features saving from the Common ScummVM options dialog in-game 195 */ 196 kSupportsSavingDuringRuntime 187 197 }; 188 198 189 199 /** -
engines/parallaction/detection.cpp
253 253 return 254 254 (f == kSupportsRTL) || 255 255 (f == kSupportsListSaves) || 256 (f == kSupports DirectLoad) ||256 (f == kSupportsLoadingDuringStartup) || 257 257 (f == kSupportsDeleteSave); 258 258 } 259 259 -
engines/queen/queen.cpp
82 82 return 83 83 (f == kSupportsRTL) || 84 84 (f == kSupportsListSaves) || 85 (f == kSupports DirectLoad) ||85 (f == kSupportsLoadingDuringStartup) || 86 86 (f == kSupportsDeleteSave); 87 87 } 88 88 … … 351 351 } 352 352 } 353 353 354 voidQueenEngine::loadGameState(int slot) {354 int QueenEngine::loadGameState(int slot) { 355 355 debug(3, "Loading game from slot %d", slot); 356 356 GameStateHeader header; 357 357 Common::InSaveFile *file = readGameStateHeader(slot, &header); … … 374 374 delete[] saveData; 375 375 delete file; 376 376 } 377 378 return 0; // TODO: return success/failure 377 379 } 378 380 379 381 Common::InSaveFile *QueenEngine::readGameStateHeader(int slot, GameStateHeader *gsh) { -
engines/queen/queen.h
108 108 109 109 bool canLoadOrSave() const; 110 110 void saveGameState(int slot, const char *desc); 111 voidloadGameState(int slot);111 int loadGameState(int slot); 112 112 void makeGameStateName(int slot, char *buf) const; 113 113 int getGameStateSlot(const char *filename) const; 114 114 void findGameStateDescriptions(char descriptions[100][32]); -
engines/saga/detection.cpp
32 32 #include "common/config-manager.h" 33 33 #include "common/advancedDetector.h" 34 34 35 #include "saga/animation.h" 35 36 #include "saga/displayinfo.h" 37 #include "saga/events.h" 36 38 #include "saga/rscfile.h" 37 39 #include "saga/interface.h" 38 40 #include "saga/scene.h" … … 155 157 return 156 158 (f == kSupportsRTL) || 157 159 (f == kSupportsListSaves) || 158 (f == kSupportsDirectLoad) || 159 (f == kSupportsDeleteSave); 160 (f == kSupportsLoadingDuringStartup) || 161 (f == kSupportsDeleteSave) || 162 (f == kSupportsLoadingDuringRuntime) || 163 (f == kSupportsSavingDuringRuntime); 160 164 } 161 165 162 166 bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { … … 236 240 return di.logicalHeight; 237 241 } 238 242 243 int SagaEngine::loadGameState(int slot) { 244 // Init the current chapter to 8 (character selection) for IHNM 245 if (getGameType() == GType_IHNM) 246 _scene->changeScene(-2, 0, kTransitionFade, 8); 247 248 // First scene sets up palette 249 _scene->changeScene(getStartSceneNumber(), 0, kTransitionNoFade); 250 _events->handleEvents(0); // Process immediate events 251 252 if (getGameType() != GType_IHNM) 253 _interface->setMode(kPanelMain); 254 else 255 _interface->setMode(kPanelChapterSelection); 256 257 load(calcSaveFileName((uint)slot)); 258 syncSoundSettings(); 259 260 return 0; // TODO: return success/failure 261 } 262 239 263 } // End of namespace Saga -
engines/saga/saga.cpp
532 532 _sound->setVolume(); 533 533 } 534 534 535 bool SagaEngine::canLoadGameStateCurrently() { 536 return !this->_scene->isInIntro(); 537 } 538 539 bool SagaEngine::canSaveGameStateCurrently() { 540 return !this->_scene->isInIntro(); 541 } 542 535 543 } // End of namespace Saga -
engines/saga/saga.h
650 650 const Common::Rect &getDisplayClip() const { return _displayClip;} 651 651 int getDisplayWidth() const; 652 652 int getDisplayHeight() const; 653 int loadGameState(int slot); 654 bool canLoadGameStateCurrently(); 655 bool canSaveGameStateCurrently(); 653 656 const GameDisplayInfo &getDisplayInfo(); 654 657 655 658 const char *getTextString(int textStringId); -
engines/scumm/detection.cpp
693 693 return 694 694 (f == kSupportsRTL) || 695 695 (f == kSupportsListSaves) || 696 (f == kSupports DirectLoad) ||696 (f == kSupportsLoadingDuringStartup) || 697 697 (f == kSupportsDeleteSave) || 698 698 (f == kSavesSupportMetaInfo) || 699 699 (f == kSavesSupportThumbnail) || -
engines/sky/sky.cpp
132 132 return 133 133 (f == kSupportsRTL) || 134 134 (f == kSupportsListSaves) || 135 (f == kSupports DirectLoad);135 (f == kSupportsLoadingDuringStartup); 136 136 } 137 137 138 138 GameList SkyMetaEngine::getSupportedGames() const { -
engines/sword1/sword1.cpp
108 108 return 109 109 (f == kSupportsRTL) || 110 110 (f == kSupportsListSaves) || 111 (f == kSupports DirectLoad);111 (f == kSupportsLoadingDuringStartup); 112 112 } 113 113 114 114 GameList SwordMetaEngine::getSupportedGames() const { -
engines/sword2/sword2.cpp
94 94 return 95 95 (f == kSupportsRTL) || 96 96 (f == kSupportsListSaves) || 97 (f == kSupports DirectLoad) ||97 (f == kSupportsLoadingDuringStartup) || 98 98 (f == kSupportsDeleteSave); 99 99 } 100 100 -
engines/touche/detection.cpp
146 146 return 147 147 (f == kSupportsRTL) || 148 148 (f == kSupportsListSaves) || 149 (f == kSupports DirectLoad) ||149 (f == kSupportsLoadingDuringStartup) || 150 150 (f == kSupportsDeleteSave); 151 151 } 152 152 -
engines/touche/menu.cpp
331 331 break; 332 332 case kActionPerformSaveLoad: 333 333 if (menuData->mode == kMenuLoadStateMode) { 334 if (loadGameState(_saveLoadCurrentSlot) ) {334 if (loadGameState(_saveLoadCurrentSlot) == 0) { 335 335 menuData->quit = true; 336 336 } 337 337 } else if (menuData->mode == kMenuSaveStateMode) { -
engines/touche/saveload.cpp
340 340 return saveOk; 341 341 } 342 342 343 boolToucheEngine::loadGameState(int num) {343 int ToucheEngine::loadGameState(int num) { 344 344 bool loadOk = false; 345 345 char gameStateFileName[64]; 346 346 generateGameStateFileName(num, gameStateFileName, 63); … … 360 360 } 361 361 delete f; 362 362 } 363 return loadOk ;363 return loadOk ? 0 : 1; 364 364 } 365 365 366 366 void ToucheEngine::readGameStateDescription(int num, char *description, int len) { -
engines/touche/touche.h
496 496 void saveGameStateData(Common::WriteStream *stream); 497 497 void loadGameStateData(Common::ReadStream *stream); 498 498 bool saveGameState(int num, const char *description); 499 boolloadGameState(int num);499 int loadGameState(int num); 500 500 void readGameStateDescription(int num, char *description, int len); 501 501 void generateGameStateFileName(int num, char *dst, int len, bool prefixOnly = false) const; 502 502 int getGameStateFileSlot(const char *filename) const; -
gui/launcher.cpp
473 473 } 474 474 } 475 475 476 class SaveLoadChooser : public GUI::Dialog {477 typedef Common::String String;478 typedef Common::StringList StringList;479 protected:480 GUI::ListWidget *_list;481 GUI::ButtonWidget *_chooseButton;482 GUI::ButtonWidget *_deleteButton;483 GUI::GraphicsWidget *_gfxWidget;484 GUI::ContainerWidget *_container;485 GUI::StaticTextWidget *_date;486 GUI::StaticTextWidget *_time;487 GUI::StaticTextWidget *_playtime;488 489 const EnginePlugin *_plugin;490 bool _delSupport;491 bool _metaInfoSupport;492 bool _thumbnailSupport;493 bool _saveDateSupport;494 bool _playTimeSupport;495 String _target;496 SaveStateList _saveList;497 498 uint8 _fillR, _fillG, _fillB;499 500 void updateSaveList();501 void updateSelection(bool redraw);502 public:503 SaveLoadChooser(const String &title, const String &buttonLabel);504 ~SaveLoadChooser();505 506 virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);507 void setList(const StringList& list);508 int runModal(const EnginePlugin *plugin, const String &target);509 510 virtual void reflowLayout();511 512 virtual void close();513 };514 515 476 SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel) 516 477 : Dialog("scummsaveload"), _delSupport(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { 517 478 _delSupport = _metaInfoSupport = _thumbnailSupport = _saveDateSupport = _playTimeSupport = false; … … 1107 1068 1108 1069 if (plugin) { 1109 1070 if ((*plugin)->hasFeature(MetaEngine::kSupportsListSaves) && 1110 (*plugin)->hasFeature(MetaEngine::kSupports DirectLoad)) {1071 (*plugin)->hasFeature(MetaEngine::kSupportsLoadingDuringStartup)) { 1111 1072 int slot = _loadDialog->runModal(plugin, target); 1112 1073 if (slot >= 0) { 1113 1074 ConfMan.setActiveDomain(_domains[item]); -
gui/launcher.h
27 27 28 28 #include "gui/dialog.h" 29 29 #include "engines/game.h" 30 #include "engines/metaengine.h" 30 31 #include "common/str.h" 31 32 32 33 namespace GUI { … … 79 80 void selectGame(const String &name); 80 81 }; 81 82 83 class SaveLoadChooser : public GUI::Dialog { 84 typedef Common::String String; 85 typedef Common::StringList StringList; 86 protected: 87 GUI::ListWidget *_list; 88 GUI::ButtonWidget *_chooseButton; 89 GUI::ButtonWidget *_deleteButton; 90 GUI::GraphicsWidget *_gfxWidget; 91 GUI::ContainerWidget *_container; 92 GUI::StaticTextWidget *_date; 93 GUI::StaticTextWidget *_time; 94 GUI::StaticTextWidget *_playtime; 95 96 const EnginePlugin *_plugin; 97 bool _delSupport; 98 bool _metaInfoSupport; 99 bool _thumbnailSupport; 100 bool _saveDateSupport; 101 bool _playTimeSupport; 102 String _target; 103 SaveStateList _saveList; 104 105 uint8 _fillR, _fillG, _fillB; 106 107 void updateSaveList(); 108 void updateSelection(bool redraw); 109 public: 110 SaveLoadChooser(const String &title, const String &buttonLabel); 111 ~SaveLoadChooser(); 112 113 virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); 114 void setList(const StringList& list); 115 int runModal(const EnginePlugin *plugin, const String &target); 116 117 virtual void reflowLayout(); 118 119 virtual void close(); 120 }; 121 82 122 } // End of namespace GUI 83 123 84 124 #endif -
gui/theme-config.cpp
499 499 "globalmain_resume=globalmainHOffset gmY scummmainButtonWidth scummmainButtonHeight\n" 500 500 "gmY=(gmY + scummmainButtonHeight + scummmainVAddOff)\n" 501 501 "gmY=(gmY + scummmainVSpace)\n" 502 "globalmain_save=prev.x gmY prev.w prev.h\n" 503 "gmY=(gmY + scummmainButtonHeight + scummmainVAddOff)\n" 504 "globalmain_load=prev.x gmY prev.w prev.h\n" 505 "gmY=(gmY + scummmainButtonHeight + scummmainVAddOff)\n" 502 506 "globalmain_options=prev.x gmY prev.w prev.h\n" 503 507 "gmY=(gmY + scummmainButtonHeight + scummmainVAddOff)\n" 504 508 "globalmain_about=prev.x gmY prev.w prev.h\n" -
gui/themes/modern.ini
273 273 globalmain_resume=globalmainHOffset gmY scummmainButtonWidth scummmainButtonHeight 274 274 gmY=(gmY + scummmainButtonHeight + scummmainVAddOff) 275 275 gmY=(gmY + scummmainVSpace) 276 globalmain_save=prev.x gmY prev.w prev.h 277 gmY=(gmY + scummmainButtonHeight + scummmainVAddOff) 278 globalmain_load=prev.x gmY prev.w prev.h 279 gmY=(gmY + scummmainButtonHeight + scummmainVAddOff) 276 280 globalmain_options=prev.x gmY prev.w prev.h 277 281 gmY=(gmY + scummmainButtonHeight + scummmainVAddOff) 278 282 globalmain_about=prev.x gmY prev.w prev.h -
gui/widget.h
117 117 118 118 virtual int16 getAbsX() const { return _x + _boss->getChildX(); } 119 119 virtual int16 getAbsY() const { return _y + _boss->getChildY(); } 120 virtual int16 getX() const { return _x; } 121 virtual int16 getY() const { return _y; } 120 122 121 123 virtual void setPos(int x, int y) { _x = x; _y = y; } 122 124 virtual void setSize(int w, int h) { _w = w; _h = h; } 125 virtual void setX(int x) { _x = x; } 126 virtual void setY(int y) { _y = y; } 123 127 124 128 virtual void handleMouseDown(int x, int y, int button, int clickCount) {} 125 129 virtual void handleMouseUp(int x, int y, int button, int clickCount) {} … … 147 151 int getHints() const { return _hints; } 148 152 149 153 void setEnabled(bool e) { if (e) setFlags(WIDGET_ENABLED); else clearFlags(WIDGET_ENABLED); } 154 void setVisible(bool e) { if (!e) setFlags(WIDGET_INVISIBLE); else clearFlags(WIDGET_INVISIBLE); } 150 155 bool isEnabled() const; 151 156 bool isVisible() const; 152 157