Commit Graph

167 Commits

Author SHA1 Message Date
Christian Kündig
82d0a4b06c EMSCRIPTEN: Load icons directly (not from an archive) 2024-02-27 17:07:13 +01:00
Le Philousophe
802c91554f COMMON: Make extrapath a Path object 2023-12-24 13:19:25 +01:00
Eugene Sandulenko
2b22b9c581
GUI: Further fixes to keymapper code 2023-10-28 21:01:18 +02:00
polyesterswing
611fd6cd5f GUI: FIX conflicting mappings between EditableWidget and GUI elements
EditableWidget took over keyboard events targeted towards Debugger and
List. This commit fixes it by reverting some part of the code to its
original state.

Fixes issues caused by PR #5366
2023-10-28 18:39:55 +02:00
Kurian Jojo
595a3d7724 GUI: Use Keymapper for EditableWidget 2023-10-24 19:01:12 +02: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
Eugene Sandulenko
461d3218af GUI: Fix assert when dynamic tooltip is empty 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
8eb91297c1 GUI: Fixed coordinate calculation for dynamic tooltips 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
2b35c7997f GUI: Implemented link tooltips for RichTextWidget 2023-09-17 00:56:28 +02:00
antoniou79
d2865e7dc6 GUI: Add allowKdbRepeats() to up/down/left/right actions in launcher
This matches also the behavior as set in engines/metaengine.cpp MetaEngine::initKeymaps()

This change is needed at least to avoid a hack on Android. Setting the "kdbRepeat" flag
for events of keeping the arrow keys pressed (on the touch virtual keyboard), as Android supports,
would not work to eg. keep going through a list upwards or downwards with the respective
arrow key pressed. Instead we had to hack the behavior of a physical keyboard which
sents multiple keypresses (keydown and keyup events), without setting the kbdRepeat flag.
However, this hack would work poorly in some game engines (eg. in LBA while rotating Twinsen,
the movement becomes "stuttering"). In-games the kbdRepeat flags is respected already due
to the setting in engines/metaengine.cpp (as far as I can tell) and resulting movement is
more fluid.
2023-08-28 21:59:30 +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
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