Commit Graph

53 Commits

Author SHA1 Message Date
Eugene Sandulenko
2b22b9c581
GUI: Further fixes to keymapper code 2023-10-28 21:01:18 +02:00
Kurian Jojo
595a3d7724 GUI: Use Keymapper for EditableWidget 2023-10-24 19:01:12 +02:00
Thierry Crozat
8f9cdff4a7 GUI: Add function in GuiManager to query if low-res GUI should be used
The same condition was scattered around in the code to switch between
normal labels and images and their lowres counterparts. Factorizing
that condition in a function will allow changing it easily.
2023-10-09 21:04:08 +01:00
Eugene Sandulenko
cd09742f40
GUI: Make MacWindowManager global to GUI
The current hack with the local variable led to unstable behaviour
on Android when the app is suspended. Also, it was leaking memory.
2023-09-27 11:56:06 +02:00
antoniou79
fa004835b3 GUI: Improve time difference checks in gui manager
Basically using unsigned integer difference to address potential errors around the overflow point of getMillis()
2023-08-09 18:51:42 +02:00
Miro Kropacek
b5dc9dd949 GUI: Fix sliding up of the console
#4953 optimized redrawing of the top dialog in commit f824f8a. This
however broke console's sliding up as the code in question depended on
the fact that it was internally equivalent to a full redraw.
2023-05-11 23:53:17 +02:00
Le Philousophe
f2166b8e8a GUI: Reorganize GuiManager::redraw() to make it more readable 2023-05-10 22:52:48 +02:00
Miro Kropacek
915dce50ea Revert "GUI: Don't enforce full redraw upon closing tool tip"
Unfortunately, it is not that simple. Tooltip may be placed also outside
of the dialog. Current implementation leaves tooltip leftovers over
the dialog below the topmost one, so reverting until I find a correct
way to achieve the goal.

This reverts commit 19b7b2aa20.
2023-05-01 03:37:26 +02:00
Miro Kropacek
19b7b2aa20 GUI: Don't enforce full redraw upon closing tool tip 2023-04-29 13:44:40 +02:00
Eugene Sandulenko
7df3792ae3 GUI: Implement drawing mode of top dialog only 2022-10-08 23:39:18 +02:00
BLooperZ
b67b88e6d9 GUI: Support unicode and BiDi in editable widget 2022-08-02 22:04:54 +02:00
Thierry Crozat
b248add106 GUI: Improve thread-safety for icons set access
The previous commit was not sufficient as getIconsSet() returns a
reference to the SearchSet and it could then be used after the
mutex had been unlocked and while it was being modified in
initIconsSet() called in another thread.
2022-07-02 21:46:14 +02:00
Thierry Crozat
8cda1fe870 GUI: Change the mechanism to update the grid launcher after upding the icons
The icons download dialog was triggering the grid launcher update after
icons had been downloaded. But that means no update was done if the
dialog had been closed during the download.

Now the GUIManager triggers the update. This fixes the missing update
when hiding the download dialog while downloading an icon set.
2022-07-02 21:46:14 +02:00
Thierry Crozat
42a2aef1c5 GUI: Add mutex for the GuiManager icon set
GuiManager::initIconsSet is called from a callback of the iconset
download dialog, which runs in a separate thread. That means the
iconset can be accessed from two separate thread (the GUI thread,
and the download thread).

This was not an issue until the previous commit as closing the
download dialog while a download was ongoing would crash ScummVM.
But now that the crash is fixed, a race condition was possible.
2022-07-02 21:46:14 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
d00f894aa6
GUI: Refresh Grid View after icon packs were downloaded 2021-11-20 00:55:44 +01:00
Eugene Sandulenko
1661fa1ba6 GUI: Read icons and metadata from gui-icons.dat 2021-11-12 14:46:34 +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
bba558770d
GUI: Expose base GUI scaling to GUI. This bumps theme version. 2021-04-17 19:41:09 +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
08f927b7ab GUI: Lock ThemeLayout to the computed base dimensions 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
Eugene Sandulenko
a0d4162a2b GUI: Compute base scale factor and set it for ThemeParser 2021-04-11 21:21:44 +02:00
Thierry Crozat
32bbf489e9 GUI: Add exitLoop() method to GuiManager
The idea is to allow backends to start a game even after the
LauncherDialog has been created, and for that they need a way
to close the existing GUI dialogs.
2020-09-13 00:21:34 +01:00
aryanrawlani28
a1a4e0c2d7 GUI: U32: Overload getStringWidth to accept U32 strings as params 2020-08-30 14:43:41 +02:00
aryanrawlani28
0f40989633 GUI: Code cleanup, add comments about RTL 2020-06-22 00:03:02 +02:00
aryanrawlani28
a832e7f423 GUI: RTL: Allow switching from one layout to other after selecting languages
GUI: RTL: Add option for forced RTL from ConfMan
2020-06-22 00:03:02 +02:00
aryanrawlani28
a7fe8ad7d8 GUI: Rename some variable and fix review issues 2020-06-22 00:03:02 +02:00
aryanrawlani28
e5fc39bb98 GUI: RTL: Support stacked dialogs and fix mouse events for them
GUI: RTL: Add helpers for overlay dialogs
2020-06-22 00:03:02 +02:00
aryanrawlani28
5db49a6d1e GUI: RTL: Test for strict RTL GUI 2020-06-22 00:03:02 +02:00
Bastien Bouclet
54f57568bc GUI: Expose the keymap builder function 2020-01-26 23:09:08 +02:00
Bastien Bouclet
9c0bc2b633 KEYMAPPER: Simplify the way keymaps are enabled and disabled 2020-01-26 19:07:53 +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
Eugene Sandulenko
aad6c6346b GUI: Added easter egg 2019-10-14 00:14:38 +02:00
Jaromir Wysoglad
58065ceacd TTS: Refactoring
* Delete multiple empty rows
 * Make getVolume non-virtual and leave just the implementation
    in base class
 * Resolve warning about signed / unsigned comparison in
    gui-manager
 * Clear availableVoices when updating voices on linux
 * By default set language to transMan language on windows
    (if the transMan is available)
 * Remove freeVoices method from Windows ttsMan, it isn't needed
    anymore
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
4ec10ffec7 TTS: Remove "static" from initTextToSpeech() 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
324a90f4f6 TTS: Implement tts state switching when needed.
The state has to be pushed and poped when there is a transition
between game and gui code.
2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
8bd7e39265 TTS: Add voice selection to options 2019-09-01 22:47:55 +03:00
Bastien Bouclet
5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Thierry Crozat
cc75d17e9c GUI: Allow delayed deletion of GuiObject
This is achieved by adding a list of GuiObject to delete to GuiManager
and doing the deletion in GuiManager::runLoop.

The main purpose of this is to avoid the deletion of ButtonWidget object
while their ButtonWidget::sendCommand function is being called. For
example the sendCommand of the Apply button of the OptionsDialog
may cause a rebuild (if the GUI language was changed) which tries to
delete the widgets inside the OptionsDialog, including the Apply button.
2017-03-10 02:02:58 +00:00
Alexander Tkachev
31e528c070 GUI: Make ScrollContainerWidget do full redraw 2016-07-03 12:17:43 +02:00
Ori Avtalion
be1fdf59bb GUI: When dialogs gain focus, inform them of the current mouse position
Previously, they only reacted to the mouse position once it was moved.
This meant that if the cursor was on a button that just gained focus,
it did not highlight.

Fixes #7101.
2016-04-06 17:51:30 +03:00
Eugene Sandulenko
8360d3cd6f GUI: Do not show splash when ran from launcher 2015-11-11 21:36:27 +01:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
Johannes Schickel
9f3fbe1bd7 GRAPHICS/GUI: Implement kerning support for Font.
This adapts the related graphics code, which is the generic Font API and the
TTF font implementation.

It furthermore adapts the GUI to properly take care of kerning in text input
widgets.
2012-01-29 16:26:20 +01:00
Tarek Soliman
a5082ffa5d KEYMAPPER: Skip GUI keymap when displaying active keymap in keymapper dialog
This fixes a problem where opening the keymapper dialog would cause the current game
keymap to be displayed as the active keymap but then changing the keymap selection
back to it would cause the GUI keymap to be displayed as the active one. The GUI keymap
was indeed at the top of the stack but that's not the desired effect.

Also move the pushing and popping of the keymap to Dialog::Open/Close
Also constantify the GUI keymap name
2011-10-27 10:46:22 -05: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