Commit graph

499 commits

Author SHA1 Message Date
Filippos Karapetis
e157b7044e GUI: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Thierry Crozat
2811013ada Revert "GUI: Disable load button in Grid Launcher when no savegame can be loaded"
This reverts commit a86405389a.
2025-01-02 17:43:06 +01:00
Thierry Crozat
a86405389a GUI: Disable load button in Grid Launcher when no savegame can be loaded 2024-12-24 13:17:02 +02:00
Thierry Crozat
a50436db59 GUI: Remove unused function in GridWidget
The openTray function is no longer used since commit fb9c232 when
openTrayAtSelected was introduced and used instead.
2024-12-24 13:17:02 +02:00
Cameron Cawley
58a9aa6a2c COMMON: Deprecate U32String constructors that accept a uint32 array 2024-11-29 01:14:36 +02:00
Cameron Cawley
8a91b6a1c7 GUI: Fix a crash when exiting the grid view 2024-10-25 20:06:28 +02:00
Eugene Sandulenko
4b7782448c
GUI: Fix usage of deprecated ManagedSurface methods 2024-10-24 15:07:01 +02:00
sluicebox
4f1ae736e5 GUI: Fix clicking on PopUpDialog separator
Clicking on a separator caused an empty selection.

Introduced in: 41f2ef9745
2024-09-23 23:00:22 +03:00
tunnelsociety
b06482b2c9 GUI: Fix leak in widgets/grid.cpp
_disabledIconOverlay, a ManagedSurface regularly re-instantiated, should be
deleted rather than merely have its free() method called.

While here, remove an if() which is guaranteed true lest scummvm segfault.
2024-09-16 10:09:01 +03:00
Cameron Cawley
ff530edcb1 GRAPHICS: Deprecate ManagedSurface methods that implicitly copy pixel data 2024-07-02 13:31:18 +01:00
Cameron Cawley
96f9569790 GUI: Make use of simple blitting routines where possible 2024-06-19 02:36:17 +02:00
Cameron Cawley
afb383f3b1 GUI: Remove automatic scrollbars from TabWidget 2024-06-14 01:15:12 +02:00
sluicebox
4308849811 GUI: Add ListWidget commands: single click and edit start
These commands allow greater control over editable ListWidgets, although
the save dialog's list is currently the only one.

kListItemSingleClickedCmd allows clients to respond to selection changes
based on the method used (mouse vs keyboard) and allows responding to
clicking on an already selected item. In the next commit, this will fix
multiple save issues.

kListItemEditModeStartedCmd allows clients to initialize edit mode
consistently. The save dialog has been doing custom initialization after
calling startEditMode, but this is incorrect because ListWidget calls
startEditMode in response to Enter, so the initialization is skipped.
2024-05-22 21:47:07 -04:00
sluicebox
7fb6052aa7 GUI: Allow delete/backspace on editable ListWidgets
Fixes the delete/backspace hotkey on the save list dialog; it was only
working on the load list even though they both have the same delete
functionality.

This is a check from 17 years ago that I believe was confused and had
no effect at the time. I believe the intent was to ignore these keys
while in edit mode, which makes sense, but instead this code ignored
these keys on all editable lists when *not* in edit mode. This wasn't
noticeable because there's only one editable ListWidget in ScummVM,
the save list, and it didn't listen for kListItemRemovalRequestCmd
until three years ago: aac1eb12bf
2024-05-22 21:47:07 -04:00
sluicebox
66d1f6d56a GUI: Make EditableWidget::caretVisualPos const 2024-05-13 09:04:07 -07:00
sluicebox
d4c41f6214 GUI: Fix ListWidget drawing caret on disabled items
When in edit mode on the save dialog, clicking on a disabled item, such
as the Autosave slot 0, would draw the stale caret on the disabled item
at the x position of the previous item.
2024-05-13 09:04:07 -07:00
Eugene Sandulenko
6fc5c46539
GUI: Disable the super-slow TTF font rendering in RichText
It requires proper font caching
2024-05-12 15:26:33 +02:00
Eugene Sandulenko
5bd7b57282
GRAPHICS: MACGUI: Switch TTFMap to saner data structure not requiring global constructor 2024-05-12 15:23:30 +02:00
sluicebox
6ec7d5b811 GUI: Move Mass Add list code into MassAddListWidget
Fixes list colors in other dialogs that use ListWidget

See: e9f2468df9
2024-05-10 12:16:11 +02:00
InariInDream
e70ea93149 GRAPHICS: MACGUI: Add support for TTF font maps 2024-05-04 00:14:31 +02:00
AndywinXp
69b9f8e231 GUI: Implement handleMouseUp for Grid layout
This makes it so that games are started on the release
of the left mouse button after a double click, instead of
during it being pressed.
This fixes the left mouse button release leaking into the
launched game as actual engine input.
2024-05-03 23:53:15 +02:00
Torbjörn Andersson
a46913545f GUI: Keep caret visible in editable widgets while moving it
This was actually the intention all along. But if a redraw of the widget
itself was triggered at the same time, it would draw over the caret,
effectively erasing it. To get around this, the caret is now also drawn
as part of the widget, when necessary.
2024-04-25 00:57:04 +02:00
HectorRecloud
e9f2468df9 GUI: Skip games during Mass Add
Use [x] for selected games, as well as enabled list items.

Co-Authored-By: Filippos Karapetis <bluegr@gmail.com>
2024-04-07 14:06:33 +02:00
D G Turner
4af395ebb9 GUI: Jamnitorial Cleanup of Code Formatting
No functional change.
2024-03-30 17:26:24 +00:00
D G Turner
e52f32cdd2 GUI: Fix Signed vs. Unsigned GCC Compiler Warnings 2024-03-30 17:17:04 +00:00
kunxl-gg
da3c3d097c GUI: Fix selector position after removing a game.
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Added algorithm for feature

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Fix merge conflicts

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Added conditional statement

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Removed equality sign in getNextPos

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Fix lint issues

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Fix redundant variables

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Removed redundant include

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Fix lint issues

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>

Fix lint issues

Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
2024-03-28 13:47:02 +01:00
Torbjörn Andersson
a1c8db3201 JANITORIAL: Clean up some whitespace and double semicolons 2024-01-29 19:32:00 +01:00
Le Philousophe
ed9ded9e83 GUI: Migrate GUI to Path class 2023-12-24 13:19:25 +01:00
Thierry Crozat
ebf5979cf4 GUI: Fix resizing RichTextWidget
There were two main issues:
1. The intermediate surface on which the rich text is drawn was not
   resized when the widget was resized. This resulted in text being
   cut.
2. The Graphics::MacText does not properly handle width changes,
   Resize is not handled at all if there is a table, but even when
   there is no table it can have issues with the font.
   As a workaround it is now recreated instead of being resized.
2023-12-14 16:56:48 +01:00
Thierry Crozat
5d118c4849 GUI: Add inner margin in RichTextWidget 2023-12-14 16:56:48 +01:00
Eugene Sandulenko
743bd78fb4
GUI: Fix crash when adding a game in some circumstances 2023-12-12 01:16:39 +01:00
Eugene Sandulenko
2db0c24ce6
GUI: Implement finger scrolling in RichTextWidget 2023-11-02 22:52:55 +01:00
Eugene Sandulenko
7ff167190b
GUI: Switched URL clicking in the Richtext widget to mouse up 2023-11-02 22:21:55 +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
a06af86770
GUI: Fix memory leaks in RichTextWidget 2023-09-26 23:53:43 +02:00
Eugene Sandulenko
18953d5907
GUI: Remove unused variable. CID 1519082, 1519090, 1519092 2023-09-19 15:49:07 +02:00
Eugene Sandulenko
afd6866a3c GUI: Speed up RichTextWidget scrolling 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
367b059040 GUI: Fix type in ScrollCOntainerWidget height calculation 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
c0db1957c8 GUI: Pick up theme font size in RIchTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
fd98104c9e GUI: Open URL when clicking on the links in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
3a84773936 GUI: Pass image archive from RichText to MacText 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
Eugene Sandulenko
a00ae54785 GUI: Fixed default text color in RechText 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
df0fa2c709 GUI: Simplified text width calcultions in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
20a0888c8d GUI: Fix scrollbar behavior in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
75fa02a879 GUI: Implement scrolling in RichTextWidget 2023-09-17 00:56:28 +02:00
Eugene Sandulenko
bb4792e413 GUI: MOre work on adding scrollbar to RichTextWidget 2023-09-17 00:56:28 +02:00