Commit Graph

156 Commits

Author SHA1 Message Date
Le Philousophe
c276e89888 GUI: Don't display tooltips while dragging mouse
Displaying it cancels the dragging.
2023-06-18 20:39:59 +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
Miro Kropacek
6e4d7798f9 GUI: Remove redundant redraw calls
When calling any of:

- Widget::setEnabled
- EditTextWidget::setEditString
- EditableWidget::setEditString
- StaticTextWidget::setLabel

there is no need to call neither GuiManager::scheduleTopDialogRedraw nor
Widget::markAsDirty afterwards -- they set up the call by themselves.

Also, refactor a couple of code blocks into calling just
GuiManager::redrawFull as it does the same thing.
2023-05-10 22:52:48 +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
Miro Kropacek
f824f8ad13 GUI: Don't redraw whole dialog stack with kRedrawTopDialog 2023-04-29 12:00:49 +02:00
Eugene Sandulenko
92186deb09
GUI: Mark Arabic as RTL 2023-03-26 01:48:48 +01:00
Donovan Watteau
18ab6803d6 JANITORIAL: Fix various "an" typos in comments 2023-03-16 14:47:28 +01:00
Eugene Sandulenko
e41559cfa5
GUI: Moved icons pack set generation to common/ 2023-01-08 01:15:51 +01:00
Eugene Sandulenko
01fed3e462
GUI: Load icons set in correct order
Previously we were loading default gui-icons.dat first which
was effectively preventing us from overriding the matching files
from the icon packs.
2023-01-05 14:38:59 +01:00
Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Le Philousophe
c6451a2ec9 GUI: Fix top dialog only drawing
Before that the parent was also drawn.
2022-11-06 20:02:59 +01:00
Eugene Sandulenko
7cd63b418a GUI: Do not apply shadow on single dialog draw 2022-10-08 23:39:18 +02:00
Eugene Sandulenko
7df3792ae3 GUI: Implement drawing mode of top dialog only 2022-10-08 23:39:18 +02:00
Misty De Meo
c3af8f0a7f GUI: workaround for "unsupported game" dialogue
This sendCommand() call interrupts the "this game is unsupported" call,
causing it to automatically cancel.

Fixes a bug introduced by 8cda1fe870.
2022-08-16 22:17:59 +01:00
Thunderforge
fe001b35b5 COMMON: Adding default iconspath functionality
It's for macOS only right now.
2022-07-02 22:34:36 +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
athrxx
eb29aea4b4 TTS: (Windows) - implement better way to disable the option
Currently, the text-to-speech manager will try to update the voices whenever TextToSpeechManager::pushState()/popState() is called. This causes lags of 4 - 5 seconds on Windows. Also, a warning is triggered each time. This commit prevents that from happening if the tts option is not enabled.

This commit currently affects only Windows. Other backends don't make use of the new _enabled setting. I don't know if it would make sense for any of these and I also wouldn't be able to test it.
2022-04-26 21:08:41 +03:00
Le Philousophe
1b3ac06f69 GUI: Fix various memory leaks related to grid widget 2022-01-06 19:36:23 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Lothar Serra Mari
d59b31238e GUI: Add comment regarding the 1ms delay we need with vsync enabled 2021-11-21 01:21:41 +01:00
Lothar Serra Mari
d272bc5d65 GUI: Fetch vsync capability from backend instead of ConfMan 2021-11-21 01:21:41 +01:00
Lothar Serra Mari
7a01729d1f GUI: Fix cursor stuttering with vsync enabled 2021-11-21 01:21:41 +01:00
Eugene Sandulenko
d00f894aa6
GUI: Refresh Grid View after icon packs were downloaded 2021-11-20 00:55:44 +01:00
Eugene Sandulenko
c82b1f88bc
GUI: Properly check gui-icons.dat in themepath
themepath is never added to SearchMan, thus File::open() does
not work for it
2021-11-18 22:38:42 +01:00
Torbjörn Andersson
1402a78a01 Revert "GUI: Fix memory leak"
I suspect the file object is used later, so I can't delete it here.

This reverts commit c7f4d96a9d.
2021-11-15 10:00:18 +01:00
Torbjörn Andersson
c7f4d96a9d GUI: Fix memory leak 2021-11-15 09:49:38 +01:00
Eugene Sandulenko
a965e01857
GUI: Do not leak memory on gui-icons.dat opening failure 2021-11-14 23:00:13 +01:00
Eugene Sandulenko
72adc6ba2b
GUI: Simplify gui-icons.dat searching 2021-11-14 22:53:55 +01:00
Eugene Sandulenko
3d82c0e8b4
GUI: Fix loading gui-icons.dat from Windows resource 2021-11-14 22:23:17 +01:00
Torbjörn Andersson
9c206acf06 GUI: Fix memory leak 2021-11-14 18:49:41 +01:00
Eugene Sandulenko
502a385ec7
GUI: Guard against double inserting of same objects to the trash queue 2021-11-14 14:39:56 +01:00
Eugene Sandulenko
1008f64d74
GUI: Added support for multiple icon archives 2021-11-12 16:14:19 +01:00
Eugene Sandulenko
a5844fd8da
GUI: Added possibility to keep gui-icons.dat in iconspath 2021-11-12 15:47:22 +01:00
Eugene Sandulenko
1661fa1ba6 GUI: Read icons and metadata from gui-icons.dat 2021-11-12 14:46:34 +01:00
Alexandre Detiste
6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
Scott Percival
0112fab176 EVENTRECORDER: Filter GUI redraws from the logs 2021-09-09 19:32:02 +02:00
Cameron Cawley
e8c54ed7aa DS: Work around issues with GUI scaling at low resolutions 2021-08-20 17:43:19 +01:00
Thierry Crozat
9fcd67b2a7 GUI: Never scale the GUI below 320x200 2021-08-15 09:52:03 +01:00
Thierry Crozat
ad31dfc8d5 GUI: Handle the GUI Scale option as a scaling rather than base resolution
Now that we can get an accurate HiDPI screen scaling from OSystem,
defaulting to using that seems to make sense. But we may still want
to use a slightly different scaling. The GUI scale option allows
that by providing a scaling (in percentage) with which to multiply
the HiDPI scaling.

I think it works better than a base resolution as it avoids having
the GUI getting bigger or smaller when we resize the window.

This commit keeps a popup widget, but this could be changed with
 a slider if we want more fine grain control.
2021-08-13 21:41:33 +01:00
Thierry Crozat
abf782c670 COMMON: Remove kFeatureHiDPI from OSystem and use getHiDPIScreenFactor instead 2021-08-13 21:41:33 +01:00
Thierry Crozat
cbb627a40b COMMON: Change TransMan builtin language to "en" instead of "C" 2021-08-04 19:28:47 +01:00
SupSuper
782cd55c31 GUI: Fix RTL Add Game dialog leaving UI in a broken state (#12765)
Make sure we clear all RTL dialog paddings once we go back to the launcher.
2021-07-28 09:37:25 +01:00
sluicebox
85f789a8ad GUI: Fix shading being applied more than once 2021-07-28 07:29:40 +02: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
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
Cameron Cawley
0aa8aea4f7 GUI: Remove default mappings for the EE action 2021-05-01 21:06:18 +01:00
Cameron Cawley
da960cd939 GUI: Add EE to the GUI keymap 2021-04-18 15:28:51 +02:00