Commit Graph

198 Commits

Author SHA1 Message Date
Die4Ever
30a8d927a1 GUI: tabs with scrollbars 2022-01-23 20:28:55 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
av-dx
699b939d9d GUI: Add scaleGfx declaration to widget.h 2021-11-12 14:46:34 +01:00
av-dx
bfca5f8b11 JANITORIAL: Cleanup leftovers 2021-11-12 14:46:34 +01:00
av-dx
6a57173c5a GUI: Moved Grid widgets to separate files. 2021-11-12 14:46:34 +01:00
av-dx
8dcb3c298a GUI: Reverted scaleGfx() to return const pointer 2021-11-12 14:46:34 +01:00
av-dx
ba91762825 GUI: Reusable containers for Grid Items 2021-11-12 14:46:34 +01:00
av-dx
cf3dd4f845 GUI: Fix memory leak in thumbnail scaling. 2021-11-12 14:46:34 +01:00
av-dx
4d07dd48e3 GUI: Switch to GridItemInfo struct from LauncherEntry 2021-11-12 14:46:34 +01:00
av-dx
f09a05cbb4 GUI: Dynamically "load" thumbnails during scroll or resize 2021-11-12 14:46:34 +01:00
av-dx
823474faaf GUI: Remove gridFromList() to move code to reflowLayout() 2021-11-12 14:46:34 +01:00
av-dx
b6ccca78c0 GUI: Move Grid Initialisation to reflowLayout() 2021-11-12 14:46:34 +01:00
av-dx
64afe7a55f GUI: JANITORIAL: Fix misleading/ambigous names 2021-11-12 14:46:34 +01:00
av-dx
50611aa60b GUI: Fix transitive clipping behaviour 2021-11-12 14:46:34 +01:00
av-dx
43d864e97a GUI: Fix grid scroll going offscreen 2021-11-12 14:46:34 +01:00
av-dx
b931a37028 GUI: Make use of scaleGfx() to scale icons 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
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
da461da6f6 GUI: Fix tooltip behavior to be less interruptive
The tooltip will show only if mouse cursor was moved but not on a hovered focused editText field

Changes and implications in this commit:
- Fix _lastMousePosition coordinates and time being updated upon giving focus to the tooltip
- Check for mouse cursor movement first in the decision for showing the tooltip, then check if sufficient time for mouse resting position has passed (kTooltipDelay).
- Prevents showing a tooltip for a widget if it is an editable field (editText) and has both mouse hovering above it and the current focus.
This is so that typing text is not interrupted / slowed down by a periodical display of the tooltip, if the mouse is hovering over the same text field that the user is editing.
- If mouse cursor is moved but lands on the same widget as the one that had its tooltip shown last, then show the tooltip but after a different (larger) delay kTooltipSameWidgetDelay.
- Still shows tooltip for other widgets, including editText ones, if the mouse is hovered over them and they are not the current focused editText widget.

The bug was mentioned for the Android port on the forums here:
https://forums.scummvm.org/viewtopic.php?p=95531#p95531
However, it is not Android specific, even though the slowdown is a lot more noticeable on an Android device.
2021-06-19 14:39:34 +02:00
Eugene Sandulenko
36755f2276
GUI: Add parameter for optional scaling GraphicsWidget 2021-04-17 15:04:35 +02:00
Eugene Sandulenko
bd083c7fa7 GUI: Switch GUI to ManagedSurface 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
19de7655c1 GUI: Switch GraphicsWidget to ManagedSurface 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
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
Cameron Cawley
76b25ec1c3 GUI: Add a checkbox to allow overriding the global backend settings 2021-03-15 16:52:52 +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
ef7ec444d3 GUI: U32: Enable u32 for tts (Windows)
They always take in U32 strings now.

- Revert tts descriptions to string, they don't use translations, so better to keep it as strings.
- Make read() take in const U32 references.
2020-08-30 14:43:41 +02:00
aryanrawlani28
d4d5b8906e GUI: U32: Begin making TTS take in U32Strings for saying
Only for strings without an explicit action. The first level takes in a u32 string, encodes it, and passes it along further with the default action

- For gui widgets, the strings are passed in as native u32 strings.
- For everything else, they are being converted to u32 by Common::convertToU32... and then being passed along
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
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
07ab77d065 GUI: RTL: Get internal widget RTL flag from theme 2020-06-22 00:03:02 +02:00
aryanrawlani28
08f5efd23e GUI: RTL: Add rtl flag and helper function to widget 2020-06-22 00:03:02 +02:00
Bastien Bouclet
f7efd3cd7f GUI: Fix error when renaming a target in the edit game dialog
The OptionsContainerWidget keeps a copy of the name of the game domain
that needs to be updated when the target is renamed.

Ideally, OptionsContainerWidget would simply keep a pointer to the
ConfigurationManager::Domain object, however that's not currently
possible as the ConfigurationManager defaults are global instead of
being per domain. As a result they are not accessible from the Domain
object.

Fixes #11416.
2020-04-11 08:16:21 +02:00
Bastien Bouclet
c8f2d8a1d3 GUI: Introduce OptionsContainerWidget, a container for settings widgets
OptionsContainerWidget is a GUI widgets container that is meant to be
used for configuration dialogs tabs. It provides an interface subclasses
can implement for loading and saving settings from a configuration domain.
2020-03-28 07:38:39 +01:00
Bastien Bouclet
8ae288c52f GUI: Allow defining layouts programmatically with a chaining syntax 2020-03-28 07:38:39 +01:00
Bastien Bouclet
6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet
c566d02992 GUI: Add override markers where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet
c0d8b6d9fc GUI: Introduce dynamic layouts
Prior to this change, a GUI layout was only affected by the screen size.
Now, a layout can additionally be influenced by the GUI dialog and widgets
that uses it. This capability is leveraged to implement the following
features:

* Layout elements that are not bound to a GUI widget do not take space.
   This means that dialogs where the widgets shown depend on for example
   a feature being enabled at configure time no longer have blank spaces.
* Widgets can define a minimal required size for their contents not to be
   cut. For now this is only used for buttons so their width is always
   sufficient for their caption not to be cut. This mechanism could be
   applied to other widget types in the future.
2020-01-04 10:56:25 +01:00