Commit Graph

62 Commits

Author SHA1 Message Date
D G Turner
aa26d5def4 ENGINES: Add error handling for GMM Gamestate Load/Save Usage.
As indicated by wjp, the Global Main Menu (GMM) did not check or report
on the returned error state from saveGameState() and loadGameState() usage.
This corrects this and adds a MessageDialog report of any failure.
2012-02-21 22:30:29 +00:00
Tarek Soliman
fbb6af0359 ENGINES: make the default savegame description be the timestamp
Shamelessly copied from the SCI engine code
2011-09-23 22:06:08 -05:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
athrxx
1a05efa8ed GUI: fix bug #2822778
(Savegames now get loaded after GMM dialogue execution. This avoids mouse cursor glitches (e.g. mouse cursors which get changed during loadGameState() being popped when the dialogue closes).
2011-06-25 15:54:36 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Thierry Crozat
06bbb57ad7 I18N: Make many more GUI MessageDialog strings translatable 2011-06-13 22:19:18 +01:00
Max Horn
477d6233c3 ENGINES: Change 2nd param of Engine::saveGameState to Common::String 2011-06-02 18:31:59 +02:00
Max Horn
86240bb0dc ENGINES: Get rid of some s(n)printf calls 2011-06-02 18:31:58 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
7bac92388f MOHAWK: Fix MohawkEngine_Myst::runLoadDialog
This incorrectly invoked (indirectly) the runModal() method of a
SaveLoadChooser, but for that one should use runModalWithPluginAndTarget
instead.

svn-id: r55816
2011-02-07 22:58:42 +00:00
Max Horn
41121be4d6 GUI: Rename SaveLoadChooser::runModal to runModalWithPluginAndTarget
This avoids hiding an overloaded virtual method, which in turn can
cause weird bugs (see also the next commit).

svn-id: r55815
2011-02-07 22:58:22 +00:00
Max Horn
668adaa461 GUI: Rename gui/GuiManager.* to gui/gui-manager.*
svn-id: r54265
2010-11-16 10:19:01 +00:00
Max Horn
427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Thierry Crozat
2b33642d54 GUI: Fix GMM labels translation for SCUMM engine
In the SCUMM engine (and maybe other engines), the GMM Dialog is created
in the engine constructor and before the window resolution is updated (so it is
still using the resolution from the Launcher). Therefore if the global scaler is x2
but a SCUMM game overwrite it to use x1, it was not using the correct labels
when they had a different translation for the lowres context.

svn-id: r54237
2010-11-14 21:10:56 +00:00
Max Horn
a1dd7a07a1 ENGINES: Remove some 'using' statements
svn-id: r54001
2010-11-01 16:00:17 +00:00
Max Horn
86d6f3c200 GMM: Add a basic help dialogs for engines not providing one (i.e. all but SCUMM)
svn-id: r53860
2010-10-26 21:54:57 +00:00
Thierry Crozat
37027d6531 I18N: Add "lowres" context for several GUI strings when in 1x mode.
This enables translators to use a different translation for these strings in
1x mode (e.g. 320x200 or 320x240) and in 2x or 3x modes.

svn-id: r52461
2010-08-30 22:24:40 +00:00
Eugene Sandulenko
01f9006ee7 GUI: Implement tooltips. FR #2821513.
FR #2821513: "GUI: add tooltips".
Added tooltips for Add Game button, clear field buttons and couple
other.

Current problem: Only first call correctly restores text. I could
not find where restore information gets lost.

svn-id: r49774
2010-06-15 10:52:35 +00:00
Eugene Sandulenko
3fafa07ab0 GUI: Added in-place hotkeys for widgets.
Now it is possible to specify hotkeys in place for ButtonWidget
and CheckboxWidget (the only widgets with hotkeys now).

Use de-facto standard with putting hotkey between tildes (~).
Like '~O~pen'. The tildes gets stripped before after hotkey
is extracted.

This is done for giving translators possibility to specify
their own hotkeys.

Old hotkeys defined at widget instance creation are left for
leaving possibility to specify non-printable hotkeys such as
Common::ASCII_ESCAPE.

Translation files were updated respectively.

svn-id: r49766
2010-06-15 10:47:31 +00:00
Eugene Sandulenko
859212df25 Implement translation support for ScummVM GUI.
Based on patch #2903830: "Updated Translation Prototype" by alexbevi
which in turn is based on patch #1739965 by jvprat.

Currently it builds all translations right into ScummVM. Once the
feature will be accepted more widely, i.e. more translations will
pop up, it will be trivial to move translation strings to external
file.

Finished translation: Russian
Unfinished translation: Hungarian

Things which are nice to do:
 - Language code -> language mapping for more user friendness
 - Specifying fonts to be used with language
 - Updating of interface language without restart. It will require
   moving of much code to reflowLayout() methods for each dialog

The .po files must be in single byte encodings. I.e. no support
for Unicode.

svn-id: r49759
2010-06-15 10:44:51 +00:00
Max Horn
947edd08c3 Replace SCUMM F5 dialog by GMM & add help button to GMM
The new "Help" button in the GMM is currently only used by SCUMM.
To use it, an engine currently needs to subclass MainMenuDialog.

svn-id: r49249
2010-05-26 19:54:50 +00:00
Max Horn
894e2aefe6 GUI: Unify various definitions of kOKCmd and move it to namespace GUI
svn-id: r48564
2010-04-06 09:26:43 +00:00
Max Horn
745edbadc7 Factor out save/load code from MainMenuDialog::handleCommand into new methods
svn-id: r48563
2010-04-06 09:26:20 +00:00
Max Horn
3a8366526b Remove old & undocumented MSVC 6 workaround
svn-id: r48561
2010-04-06 09:25:44 +00:00
Eugene Sandulenko
bbac0f1eea Implement FR#862150: "GUI: Show subtitles/speech options only for speech games"
Add generic per-game GUI options support along the way ;)

svn-id: r41275
2009-06-06 17:58:08 +00:00
Lars Persson
4f3a50913e Added keyboard mapping for global menu.
svn-id: r38981
2009-02-28 21:05:21 +00:00
Lars Persson
adbc453163 Fixed working Keys button in in game options dialog
Fixed key mappings dialog layout

svn-id: r36285
2009-02-12 22:05:07 +00:00
Travis Howell
9f2d6d82ca Make the subtitle settings in Options section of the global main menu optional, and enable only for game engines where subtitles settings are synced.
svn-id: r36237
2009-02-07 06:47:19 +00:00
Johannes Schickel
690b88f982 Renamed gui/newgui.cpp -> gui/GuiManager.cpp and gui/newgui.h -> gui/GuiManager.h
svn-id: r35668
2009-01-02 03:21:40 +00:00
Eugene Sandulenko
696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Max Horn
c0f82d3518 Renamed Graphics::TextAlignment -> Graphics::TextAlign and merged it with GUI::ThemeEngine::TextAlignVertical
svn-id: r35023
2008-11-12 14:30:16 +00:00
Max Horn
201c26fcd0 cleanup
svn-id: r35017
2008-11-12 12:50:21 +00:00
Max Horn
a39c78a1ba Moved GUI::SaveLoadChooser to its own source file
svn-id: r35002
2008-11-11 12:13:55 +00:00
Vicent Marti
b98f89c7f0 Merged GUI::Theme and Gui::ThemeEngine into the same class, GUI::ThemeEngine.
Massive cleanup.

svn-id: r34983
2008-11-10 11:24:55 +00:00
Filippos Karapetis
bf857a73fe Save game descriptions are now set correctly in the GMM save dialog
svn-id: r34965
2008-11-09 17:53:37 +00:00
Johannes Schickel
44853bf2af Fixed bug, which might mess up the description of new savegames.
svn-id: r34949
2008-11-09 12:16:51 +00:00
Torbjörn Andersson
7b8ff8b752 Fixed warning, and what looked to me like a very minor memory leak.
svn-id: r34946
2008-11-09 09:58:59 +00:00
Max Horn
0508fec8a8 Pushing down some header deps
svn-id: r34936
2008-11-08 01:30:32 +00:00
Filippos Karapetis
57e57c49ce Saving a game from GMM is now working for the SAGA engine, though the description is not set correctly yet
svn-id: r34932
2008-11-07 19:43:01 +00:00
Filippos Karapetis
27d1959683 Added some WIP code for the GMM save dialog (still not working correctly)
svn-id: r34918
2008-11-06 20:26:19 +00:00
Max Horn
8f33d4a40a Implemented GMM loading (and, once the GMM supports it, saving) for SCUMM
svn-id: r34913
2008-11-06 15:41:38 +00:00
Max Horn
61aadb378d Fixed the EngineFeature vs. MetaEngineFeature mess, clarified some EngineFeature comments
svn-id: r34896
2008-11-04 16:11:40 +00:00
Johannes Schickel
112feada4e - Extended some comments
- Added @todos to engines/engine.h
- Added a FIXME to engines/dialogs.cpp

svn-id: r34887
2008-11-03 20:00:36 +00:00
Johannes Schickel
39a1eb8191 Check for engine support for loading/saving via GMM when enabling/disabling the buttons.
svn-id: r34886
2008-11-03 19:55:20 +00:00
Max Horn
55c10e0ec6 Patch #2122869: ALL: Common load dialog
svn-id: r34883
2008-11-03 18:32:16 +00:00
Vicent Marti
1f2ce8b188 Manual merge of the GSoC2008 GUI branch. (71 files)
svn-id: r34757
2008-10-09 11:49:35 +00:00
Max Horn
6a2f3dc0b9 Added new type Engine::Feature; pushed down some #include dependencies
svn-id: r34755
2008-10-06 12:48:52 +00:00
Vicent Marti
5f30b1f320 Merged several revisions from SVNMerge.
Fixed theme loading to use the new ArchiveMember class.

Original SVNMerge.py log:
=====================
Merged revisions 34686,34688-34689,34691-34698,34700-34705,34707-34713,34715-34722,34725-34727,34731-34732,34734-34738,34746 via svnmerge from 
https://tanoku@scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

........
  r34686 | cyx | 2008-09-29 21:09:56 +0200 (Mon, 29 Sep 2008) | 1 line
  
  add constructor to SearchSet::Node for proper init of structure members with gcc 3.4.x (see tracker items #2120595, #2106292)
........
  r34688 | cyx | 2008-09-29 22:08:26 +0200 (Mon, 29 Sep 2008) | 1 line
  
  restrict _heXmapNum to HE versions, should fix #2135822
........
  r34689 | eriktorbjorn | 2008-09-29 22:40:58 +0200 (Mon, 29 Sep 2008) | 4 lines
  
  Since no one has come up with any better suggestion... this should fix #2123258
  ("COMI: Crash after video (SAN) play"). The eos() function won't return true
  until we've tried to read *past* the end of the stream.
........
  r34691 | tanoku | 2008-09-30 00:29:07 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Ported ZipArchive::getAllNames() implementation from GUI branch.
........
  r34692 | fingolfin | 2008-09-30 11:07:03 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Order alphabetically
........
  r34693 | fingolfin | 2008-09-30 11:08:17 +0200 (Tue, 30 Sep 2008) | 1 line
  
  SAGA: Removed patchesCount from SAGAGameDescription
........
  r34694 | fingolfin | 2008-09-30 11:09:39 +0200 (Tue, 30 Sep 2008) | 1 line
  
  SCUMM HE: Use FilesystemNode::openForReading() instead of 'new Common::File' (didn't cover all instances, though)
........
  r34695 | fingolfin | 2008-09-30 11:11:25 +0200 (Tue, 30 Sep 2008) | 1 line
  
  SAGA: Forgot to commit saga.h
........
  r34696 | fingolfin | 2008-09-30 11:12:02 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Added multiple new open() methods to Common::File, which make it possible to use this class as a generic convenience wrapper around all kinds of SeekableReadStream; also renamed the name() method to the less confusing getName()
........
  r34697 | fingolfin | 2008-09-30 13:33:43 +0200 (Tue, 30 Sep 2008) | 1 line
  
  cleanup
........
  r34698 | tanoku | 2008-09-30 13:53:37 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Fixed functionality of ZipArchive::getAllNames(). Now it expects a possibly non-empty string list and returns the amount of new filenames added to it.
........
  r34700 | fingolfin | 2008-09-30 14:27:38 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Renamed Engine::quit to Engine::shouldQuit (previously, it was easily confused with Engine::quitGame); also cleaned up engine.h a bit
........
  r34701 | fingolfin | 2008-09-30 14:37:28 +0200 (Tue, 30 Sep 2008) | 1 line
  
  cleanup
........
  r34702 | fingolfin | 2008-09-30 14:38:44 +0200 (Tue, 30 Sep 2008) | 1 line
  
  AdvancedDetector: Do not (ab)use paths to keep track of files, rather, use FSNodes -- partial (?) fix for bug #2137680
........
  r34703 | fingolfin | 2008-09-30 14:58:27 +0200 (Tue, 30 Sep 2008) | 1 line
  
  SAGA: Some code cleanup
........
  r34704 | fingolfin | 2008-09-30 14:59:29 +0200 (Tue, 30 Sep 2008) | 1 line
  
  SKY: Fix detector to not (ab)use FSNode::getPath; if you want to open a FSNode, just pass it to File::open
........
  r34705 | thebluegr | 2008-09-30 15:19:14 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Fixed crash when starting IHNM, a regression from commit #34693
........
  r34707 | fingolfin | 2008-09-30 17:42:19 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Fixing ConfigManager::loadConfigFile
........
  r34708 | fingolfin | 2008-09-30 18:23:35 +0200 (Tue, 30 Sep 2008) | 1 line
  
  AGI: Another case where it is better to use FSNodes directly, instead of converting them to path strings
........
  r34709 | fingolfin | 2008-09-30 18:34:38 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Modified FilePluginProvider to use FSNodes (instead of raw filenames / paths) in its API
........
  r34710 | fingolfin | 2008-09-30 18:38:46 +0200 (Tue, 30 Sep 2008) | 1 line
  
  AGI: Got rid of yet another unwarranted use of FSNode::getPath
........
  r34711 | fingolfin | 2008-09-30 18:53:04 +0200 (Tue, 30 Sep 2008) | 1 line
  
  AGI: Simplify WagFileParser by not reading data into a memory stream first (this was there to improve performance on systems with slow seeking; those systems should use another approach, see scummvm-devel)
........
  r34712 | thebluegr | 2008-09-30 18:55:10 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Fix crash when starting ITE, a regression from commit #34705
........
  r34713 | fingolfin | 2008-09-30 19:09:41 +0200 (Tue, 30 Sep 2008) | 1 line
  
  Fix ThemeBrowser to use FSNodes, not getPath()
........
  r34715 | Kirben | 2008-10-02 16:41:50 +0200 (Thu, 02 Oct 2008) | 1 line
  
  Correct HE version for Putt-Putt Enters the Race (French/Windows).
........
  r34716 | fingolfin | 2008-10-02 18:58:59 +0200 (Thu, 02 Oct 2008) | 1 line
  
  Renamed FilesystemNode -> FSNode
........
  r34717 | fingolfin | 2008-10-02 19:08:15 +0200 (Thu, 02 Oct 2008) | 1 line
  
  cleanup
........
  r34718 | fingolfin | 2008-10-02 19:17:18 +0200 (Thu, 02 Oct 2008) | 1 line
  
  Ignore String::deleteLastChar when called on an empty string
........
  r34719 | fingolfin | 2008-10-02 19:20:21 +0200 (Thu, 02 Oct 2008) | 1 line
  
  Fix for bug #2142743: Assertion on clicking "Theme" in Options
........
  r34720 | fingolfin | 2008-10-02 19:48:01 +0200 (Thu, 02 Oct 2008) | 7 lines
  
  Engine class changed:
  - Moved initCommonGFX() && GUIErrorMessage() out of class Engine
  - got rid of the _autosavePeriod member (this prevented users from
    changing the autosave period during runtime)
  - Got rid of an evil 'using GUI::Dialog' statement
  - Clarified some Doxygen comments
........
  r34721 | fingolfin | 2008-10-02 19:52:29 +0200 (Thu, 02 Oct 2008) | 1 line
  
  Add the current dir to the global SearchSet, i.e. to SearchMan (this should fix the problems on Windows, and maybe other systems, see 'bug' #2137680)
........
  r34722 | fingolfin | 2008-10-02 19:55:08 +0200 (Thu, 02 Oct 2008) | 1 line
  
  Forgot to mention yet another Engine class change: mainMenuDialog -> openMainMenuDialog; and also forgot to commit this related file :/
........
  r34725 | fingolfin | 2008-10-02 20:11:40 +0200 (Thu, 02 Oct 2008) | 1 line
  
  typo
........
  r34726 | thebluegr | 2008-10-03 00:04:34 +0200 (Fri, 03 Oct 2008) | 1 line
  
  Merged loadHotSpotsMads() and loadHotSpotsM4()
........
  r34727 | lordhoto | 2008-10-03 02:16:21 +0200 (Fri, 03 Oct 2008) | 2 lines
  
  Fixed typos (thanks to Raziel^ for spotting them).
........
  r34731 | fingolfin | 2008-10-03 18:07:57 +0200 (Fri, 03 Oct 2008) | 1 line
  
  Fixed Engine::hasFeature to use proper types (i.e., MetaEngine::MetaEngineFeature instead of int)
........
  r34732 | fingolfin | 2008-10-03 18:14:12 +0200 (Fri, 03 Oct 2008) | 1 line
  
  SCUMM: Added french Monkey VGA variant, see bug #2129199
........
  r34734 | lordhoto | 2008-10-03 18:57:40 +0200 (Fri, 03 Oct 2008) | 2 lines
  
  Committed slightly modified patch #2034983 "Case-insensitivy and directory handling for engines".
........
  r34735 | lordhoto | 2008-10-03 20:18:42 +0200 (Fri, 03 Oct 2008) | 2 lines
  
  Check all 'kyra.dat' files in setup paths instead of only the first one found.
........
  r34736 | lordhoto | 2008-10-03 20:23:57 +0200 (Fri, 03 Oct 2008) | 2 lines
  
  Cleanup.
........
  r34737 | dreammaster | 2008-10-04 13:10:25 +0200 (Sat, 04 Oct 2008) | 1 line
  
  Bugfix to prevent NPC characters managing to walk beyond room exits without leaving the room, and thus getting stuck
........
  r34738 | fingolfin | 2008-10-04 15:09:01 +0200 (Sat, 04 Oct 2008) | 1 line
  
  Renamed some MetaEngine feature flags; removed explicit numbers from this feature flag list (nothing should rely on their specific values, anyway); added a note that Engine::hasFeature should become independant of MetaEngine::hasFeature
........
  r34746 | john_doe | 2008-10-04 23:40:14 +0200 (Sat, 04 Oct 2008) | 3 lines
  
  - Declared all stack functions as inline
  - Sleep some ms after 500 opcodes to reduce CPU load
  - Fixed odd bug in LGoP2 where text disappeared quickly without waiting for user input by returning 0x38 in sfShowPage
........

svn-id: r34749
2008-10-05 11:21:07 +00:00
Max Horn
84229ee79c Fixed Engine::hasFeature to use proper types (i.e., MetaEngine::MetaEngineFeature instead of int)
svn-id: r34731
2008-10-03 16:07:57 +00:00