Commit Graph
120 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 109beb4f86 GUI: Explicitely use Common:: namespace 2021-11-12 14:46:34 +01:00
Orgad Shaneh fe104cc337 ENGINES: Use MetaEngine consistently for getting autosave slot
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.

Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.

Amends 7adad5aaf5.
2021-10-24 16:46:06 +02:00
Orgad Shaneh b7a46e97f5 GUI: Re-enable warning when saving over an older savegame
The assignment back to _saveList is required, because the initial read does
not assign playtime.

In case the slot is empty, querySaveMetaInfos returns an empty description
with saveSlot -1 on most engines, so _saveList[selItem] loses its slot.
Cover this by adding a check.

Reverts 0425dff824.
2021-08-28 21:36:35 +03:00
D G Turner 8b239a2577 GUI: Fix GCC Signed vs. Unsigned Comparison Warning 2021-08-28 13:56:09 +01:00
Thierry Crozat 0425dff824 GUI: Fix saving in a new slot with the list save dialog
This revert part of a17816f1 (GUI: Warn when saving a "young" game
over an "older" one).

The issue was that when trying to save in a new slot with the list
save dialog, this was not creating the save.

This finishes to fix bug #12850
2021-08-27 23:30:44 +01:00
Thierry Crozat 626d0ed4b6 GUI: Fix assert when double clicking on item in list save dialog
This was a regression from 44e5d3f9 (GUI: Factor out save/load
activation to a function).

This fixes part of bug #12850
2021-08-27 23:30:44 +01:00
Thierry Crozat 5867d5420f GUI: Fix clicking in an empty space in the Grid Load dialog
This was unexpectedly closing the dialog.
This was a regression from 44e5d3f9 (GUI: Factor out save/load
activation to a function)
2021-08-27 23:30:44 +01:00
Orgad Shaneh a17816f14d GUI: Warn when saving a "young" game over an "older" one 2021-08-25 05:56:22 +03:00
Orgad Shaneh 44e5d3f9bd GUI: Factor out save/load activation to a function 2021-08-25 05:56:22 +03:00
antoniou79 e128d69748 GUI: Don't draw invisible thumbnail obstucting selection in Load Save dialogue
This fix is particular to the Load Save ScummVM dialogue where the issue is observed

A more general fix is proposed in PR https://github.com/scummvm/scummvm/pull/3080.
2021-06-26 16:44:23 +03:00
sluicebox aac1eb12bf GUI: Add delete/backspace support to save/load list
- SaveLoadChooserSimple responds to kListItemRemovalRequestCmd
- ListWidget::scrollToCurrent() only scrolls when there is a
  current selected item
2021-05-28 23:15:04 +03:00
Eugene Sandulenko 69ea52c2d0 GUI: Scale thumbnails in saveload dialog in HiDPI 2021-04-17 15:04:36 +02:00
SupSuper 8f7d28f85e GUI: Fix scaling for simple saveload dialog 2021-04-13 19:08:22 +01:00
Eugene Sandulenko d69f496380 GUI: Fix compilation with clouds disabled 2021-04-11 21:21:44 +02:00
Eugene Sandulenko bd083c7fa7 GUI: Switch GUI to ManagedSurface 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 37982f9eb4 GUI: Fix scaling for saveload dialog 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 48faae426a GUI: Rename getBaseWidth/Height to getGUIWidth/Height
This reflects its purpose better, so the user code will be
more logical
2021-04-11 21:21:44 +02:00
Eugene Sandulenko 0f925f3d87 GUI: Dropped g_gui.getWidth() and getHeight() 2021-04-11 21:21:44 +02:00
Cameron Cawley a1890ede9c BASE: Avoid calling PluginMan.getEngineFromMetaEngine where possible 2021-04-05 15:33:23 +01:00
SupSuper 70dc08f46e JANITORIAL: Cleanup inconsistent includes 2021-02-22 10:54:07 +00:00
sluicebox 6d3ed4268f GUI: Retain scroll position when deleting a save 2020-11-22 16:45:17 +00:00
Cameron Cawley c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
aryanrawlani28 71a820caff ENGINES: Begin class renaming of ME & AME
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28 8b43e79695 GUI: Fix namespaces for saveload dialogs when cloud is enabled. 2020-10-03 14:56:36 +02:00
aryanrawlani28 73cc973ad7 BASE: ENGINES: Change saveload code to adapt to the new MEC class.
- MEC: MetaEngineConnect.
- How do games handle save/load if MetaEngine (detection) is seperate from MetaEngineConnect (engine factory)?

- Most of the changes are quite similiar. ConfMan finds us the relevant MetaEngine, then simply use the new helpers from PluginMan.
- The new helpers will help convert a relevant MetaEngine into the other format or vice versa.
- Once the matching is complete, simply invoke functions by:
plugin->get<MetaEngineConnect>().engineMethod();
- Refer to previous commits to see the new class changes & notes.
2020-10-03 14:56:36 +02:00
Thierry Crozat e0802ec341 GUI: Fix SaveLoadChooserGrid not disabling write protected slots
This was broken in commit f24a89e that disabled the slots when they
are locked due to cloud sync.
2020-09-12 21:41:57 +01:00
aryanrawlani28 68d01321d6 GUI: U32: Downscale changes of U32, fix review issues
This commit addresses a range of changes, within scummvm subproject.

- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text
2020-08-30 14:43:41 +02:00
aryanrawlani28 d12c6c4338 GUI: U32: Code cleanup
- Remove extra parantheses leftover from temp code
- SaveLoadDialog - do not encode when setting labels
- Remove mapping variable from ThemeEngine::loadScalableFont (and use default 0)
- Remove incorrect u32 constructor wrapper from confman.set in eventrecorder.cpp
2020-08-30 14:43:41 +02:00
aryanrawlani28 a9bfe35216 GUI: U32: More issue fixes and general improvements
- Use the fake constructor for message dialog less often
- solve errors regarding comparision between string and u32string in midi
- solve errors in testbed/speech related to ttsMan->say
- fix unsigned comparision warning in tab.cpp
- fix issue with static strings and translations in sdl-graphics
2020-08-30 14:43:41 +02:00
aryanrawlani28 e22b32abfe GUI: U32: Use Common::U32String::format where necessary and GUIError to u32
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.
2020-08-30 14:43:41 +02:00
aryanrawlani28 bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28 b9a449480b GUI: U32: Remove u32::format references
- Removed because implicit conversion can simply handle this usecase
2020-08-30 14:43:41 +02:00
aryanrawlani28 160a1320cc GUI: U32: Rename more temp code and fix issues
- Remove convertFromU32.. where necessary
- Replace convertFromU32 to .encode() for better readability
- Fix spacing issues in tabs
- Fix spacing issues in popups
- Fix weird font rendering in certain menus.
- Fix dialog changing sizes by huge amount when changing languages
- Some minor changes from String::format to U32String::Format
2020-08-30 14:43:41 +02:00
aryanrawlani28 96912f4adb GUI: U32: Rename some references of strings to use U32() & not helper method 2020-08-30 14:43:41 +02:00
aryanrawlani28 f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
aryanrawlani28 5f2af6b93e GUI: U32: Add u32 support to Editables and Dialogs
- Editable widgets
- Lists
- SaveLoad Dialogs
- Browser Dialogs
2020-08-30 14:43:41 +02:00
aryanrawlani28 aafade4507 GUI: U32: Shift most widgets to draw with u32
- ButtonWidgets (Button, Radio, Checkbox, dropdown)
- StaticTextWidgets
- PopUpWidgets
- Tabs
- Add a temporary overloaded drawDDText function to make other widgets draw normally
2020-08-30 14:43:41 +02:00
aryanrawlani28 51d95f8978 GRAPHICS: move start + end to Graphics::TextAlign 2020-06-22 00:03:02 +02:00
BLooperZ 4fc9c11bbe GUI: use start + end for static widgets 2020-06-22 00:03:02 +02:00
aryanrawlani28 dde4200d35 GUI: RTL: Overload and simplify getWidgetData for getting rtl flag 2020-06-22 00:03:02 +02:00
aryanrawlani28 076623d419 GUI: Remove useless code and comments 2020-06-22 00:03:02 +02:00
aryanrawlani28 07ab77d065 GUI: RTL: Get internal widget RTL flag from theme 2020-06-22 00:03:02 +02:00
aryanrawlani28 d6a340d3b4 GUI: Cleanup hacky function for internal flip and fix review issues 2020-06-22 00:03:02 +02:00
aryanrawlani28 d6c2d4b809 GUI: RTL: Align fixes for text in Load game dialog 2020-06-22 00:03:02 +02:00
Eugene Sandulenko 6aacdb1938 GUI: Normalize width/height parameters
The fact that ThemeLayout had them int, and GuiObject as uint, was
leading to number of unexpected overflows.
2020-05-09 21:59:07 +02:00
Eugene Sandulenko 3a0ddbf667 GUI: Added sanity check 2020-04-27 14:50:58 +02:00
Paul Gilbert 1687427e8e ENGINES: Mark autosave slots as write protected
If the autosave slot doesn't yet have any file in it, when the
GMM save dialog is open, the autosave slot will show a default
'Autosave' entry which is write-only, to prevent users
accidentally making a savegame in that slot
2020-02-16 15:44:28 -08:00
Bastien Bouclet 6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet 4182c50a92 GUI: Fix the SaveLoadDialog with the lowres layouts
The thumbnail layout element is not available in the lowres layouts.
Issue introduced by c0d8b6d9fc.

Fixes #11304.
2020-01-05 08:34:24 +01:00