Commit Graph

301 Commits

Author SHA1 Message Date
av-dx
c664c77ea1 GUI: Remember scroll position on resizing window 2021-11-12 14:46:34 +01:00
av-dx
2900553a43 GUI: Reflow Grid when window size changes 2021-11-12 14:46:34 +01:00
av-dx
181fdcdb43 GUI: Use iterators instead of indexing in for loop 2021-11-12 14:46:34 +01:00
av-dx
34cb198dee GUI: Group entries by "gameid". 2021-11-12 14:46:34 +01:00
av-dx
2f2c1dae94 GUI: Use Common::FSNode for reading files. 2021-11-12 14:46:34 +01:00
av-dx
059deb0e50 MISC: Remove temporary warnings 2021-11-12 14:46:34 +01:00
av-dx
dc878846ee GUI: Create new widgets for the grid system. 2021-11-12 14:46:34 +01:00
av-dx
999c5d2bc6 GUI: Testing grid view with constraints 2021-11-12 14:46:34 +01:00
Cameron Cawley
d460f8f70a GUI: Avoid showing ellipses in smaller labels 2021-10-12 23:29:21 +01:00
Cameron Cawley
b444f53685 GUI: Specify the spacing for checkboxes and radio buttons in the theme files 2021-10-12 23:27:07 +01:00
antoniou79
0b10088110 JANITORIAL: Fix wrong spacing for return commands 2021-06-30 18:12:32 +02:00
antoniou79
8a04060c68 GUI: Increase scope of setGfx() fix to more setGfx() of relevant widgets
Fix is to not proceed with setGfx except for freeing _gfx mem, if widget or its boss is invisible
2021-06-30 18:12:32 +02:00
antoniou79
6fb05fceeb GUI: If GraphicsWidget is hidden do not proceed with GraphicsWidget::setGfx()
Removes interfering invisible thumbnail with list item selection in saveload-dialog (OpenGL, large scale)

I'm issuing this as a PR because I'm unsure if this fix is ok, since it affects all GraphicsWidget objects, not just the one for thumbnail in saveload-dialog. Also not sure if some similar check should be done in the other setGfx() methods in widget.cpp to prevent similar issues.
Note that an alternative fix, which also works, would be to only modify gui/saveload-dialog.cpp and method SaveLoadChooserSimple::updateSelection(), to check for _gfxWidget isVisible status before calling: _gfxWidget->setGfx(thumb, true);
2021-06-30 18:12:32 +02:00
Mathias Parnaudeau
032d030060 GUI: Fix leak of ManagedSurface in PicButtonWidget
Opening the load dialog, to display thumbnails into PicButtonWidget objects,
a call to setGfx creates a temporary ManagedSurface from a Surface but is
not instantiated, so not freed.

Same fix applied in GraphicsWidget which code is the same and reported
as potential memory leak by clang-tidy.
2021-05-12 10:40:56 +02:00
Martin Gerhardy
9d82fa51df COMMON: removed USE_TTS check from engines
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
2021-05-03 14:13:41 +03:00
Eugene Sandulenko
c0f33c73f0
GUI: Fix scale sync for GraphicsWidget 2021-04-18 10:07:40 +02:00
Eugene Sandulenko
9bcffc97ee
GUI: Fix regression in PictureWidget which led to double scaling 2021-04-17 19:41:09 +02:00
Eugene Sandulenko
36755f2276
GUI: Add parameter for optional scaling GraphicsWidget 2021-04-17 15:04:35 +02:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Eugene Sandulenko
020da412c5 GUI: Skip unnecessary gfx scaling 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
d48fb5fdf7 GUI: Do not mess with pixelformat when scaling images 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
0fc5c4c391 GUI: Keep SVGs in 32-bit format until very rendering 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
f88a622e9a GUI: Prerender SVG on theme loading
We know the resolution and we do reread everything on the resolution
change anyway. This simplifies everything: we just draw transparent
surfaces everywhere, regardless of their source format.
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
2ca73211d6 GUI: Switch Erase button to SVG and read dimensions from the theme 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
51525eeb43 GUI: Added SVG support to PicButtonWidget 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
7fe0073823 GUI: Render ManagedSurface widget with transparency 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
19de7655c1 GUI: Switch GraphicsWidget to ManagedSurface 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
66f10061d2 GRAPHICS: Switch SVG renderer to ManagedSurface 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
5f80a79871 GUI: Fix crash when requested 0 x 0 SVG rendering 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
7937c4599c GUI: Implemented GraphicsWidget::setGfxFromTheme() 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
493a343e6a GUI: Avoid double scaling for scrollbar and tab navbuttons 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
9c8a0d083b GUI: Retain aspect ratio when scaling GUI bitmaps 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
3df69113f3 GUI: Fix missing GraphicsWidget gfx in some cases 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
7a3752b394 GUI: Scale gfx from PicButtonWIdget. This fixed Hugo top menu 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
81e194d458 GUI: Scale GUI object on resize 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
003f4a4499 GUI: Do not double scale PicButtons 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
25ed466e3f GUI: Fix stretching of PicButtonWidget 2021-04-11 21:21:44 +02:00
Eugene Sandulenko
12245ffb3b GUI: Scale images in HiDPI 2021-04-11 21:21:44 +02:00
DivyamAhuja
3891055214 GUI: Fix caching of Edit Game dialog layout 2021-04-09 17:46:38 +02:00
Matthew Jimenez
f9f7d0eb10
GUI: Generate ExtraGuiOptions dynamically in a scrollable container (#2783)
This allows for the removal of hardcoded extra GUI options from the
theme files, and lifts restrictions related to the maximum number
of allowed ExtraGuiOptions
2021-02-20 13:17:11 +02:00
Cameron Cawley
c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
athrxx
5b6ffeaa3d GUI: allow ingame CJK dialogs regardless of the launcher language
This allows a text widget to be expressly marked as Japanese, Korean or Chinese, so that the theme engine may use an appropriate font.
2020-10-30 21:36:23 +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
4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28
d3e64b2df4 GUI: U32: Use const-references for tooltips 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
185fb72783 GUI: U32: Improve U32 code
- Revert accidentally put translations in mt32.cpp
- Use U32::format in some places earlier missed
- Add %u and %i for u32::format
- Add support for GUIErrorMsgFormat to use u32::format internally
- Use the above whereever needed
- Improve linux tts by removing redundant code
- Some places I had changed nullptr -> "". Revert this
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
b9e1ac102d GUI: U32: properly cleanupHotkey with u32 const iterators 2020-08-30 14:43:41 +02:00