205 Commits

Author SHA1 Message Date
Le Philousophe 03b8f6d3a3 GUI: Don't close GridItemTray too hastily if mouse is outside of it
The mouse can end up outside of the tray when scrolling and the just
clicked game has a short name.
Instead, register the case and close the tray only when mouse ended up
in it and left again.

Fix #16688.
2026-04-26 12:11:55 +02:00
Le Philousophe 93fa9318d5 GUI: Keep using _scrollPos as an integer when calculating
Only keep it float for scrolling stuff.
2026-04-25 13:06:27 +02:00
Mohit Bankar c041092694 GUI: Centralize scroll step size logic in FluidScroller 2026-04-20 23:33:23 +02:00
Mohit Bankar a2abc4c1e5 GUI: Centralize mouse wheel handling in FluidScroller 2026-04-20 23:33:23 +02:00
Mohit Bankar 15c1eaefcf GUI: Implement Fluid scroll in Launcher Grid 2026-04-20 23:33:23 +02:00
Mohit Bankar c1f0043775 GUI: Implement drag to scroll in Grid 2026-04-20 23:33:23 +02:00
Cameron Cawley 8a01c2a0b0 GUI: Use Common::SharedPtr for reusing surfaces 2026-04-14 18:46:14 +03:00
Le Philousophe 48f72f1d32 GUI: Disable Load Game button in Grid launcher
Fix #16614.
2026-03-22 18:41:10 +01:00
phyulwin e86fe749d7 GUI: Enable advanced search in Grid view
The Launcher search box supports rich syntax as documented
(e.g. engine:, platform:, lang=). This works correctly in
List view but was not working in Grid (Icons) view.

In Grid view, advanced expressions were ignored because
the filter logic was not hooked into GridWidget.

Connect GridWidget to the existing Launcher filter matcher so
Grid view uses the same search implementation as List view.
2026-02-25 10:11:04 +01:00
Mohit Bankar b72707b61e GUI: Unify ListWidget and GroupedListWidget setSelected implementation
Remove duplicate setSelected() and findDataIndex() from GroupedListWidget
and use inherited implementation from ListWidget.
2026-02-12 11:24:20 +01:00
Mohit Bankar e3b56d8714 GUI: Mark selected item in multi-selection array for all widgets
Update ListWidget, GridWidget, and GroupedListWidget setSelected() to
clear all selections and mark only the newly selected item when
multi-select is enabled.
2026-02-01 13:12:50 +03:00
Mohit Bankar dcb0877f4d GUI: Use SWAP macro instead of manual swap in GridWidget 2026-01-31 12:46:29 +03:00
Mohit Bankar e7ba7c338f GUI: Remove redundant bounds checks in grid selection logic
Simplify isSelected check by removing redundant boundary validation.
2026-01-31 12:46:29 +03:00
Mohit Bankar 21bbca9c5b GUI: Refactor selection methods in list and grid widgets
Replace duplicate addSelectedItem() and removeSelectedItem() methods with
a single markSelectedItem(int item, bool state) method in both ListWidget
and GridWidget. Update all callers across list.cpp, grid.cpp, groupedlist.cpp,
and launcher.cpp to use the new unified method.
2026-01-31 12:46:29 +03:00
Mohit Bankar 3bf41f2e66 GUI: Implement bool array selection for ListWidget and GridWidget
- Replace int array _selectedEntries with bool array _selectedItems in GridWidget
- Rename getSelectedItemsBool() to getSelectedItems() in ListWidget
- Update performGameRemoval() to accept bool array parameter
- Simplify selection logic and improve deletion efficiency
2026-01-31 12:46:29 +03:00
Mohit Bankar 8aff66dc92 GUI: Fix multi-selection in grouped grid view
Fixes an issue where Shift+Click multi-selection in the grid view would select the wrong games when grouping was active. Now, Shift+Click correctly selects only the games you see between your first and second click, matching the visual order in the grid.
2026-01-31 12:46:29 +03:00
Mohit Bankar c9f0f87e2d GUI: Prevent duplicate entries in grid shift-click selection
Fix grid view multi-selection logic to avoid adding duplicate entries
when shift-clicking the same or overlapping ranges. Now, each entry
in the selection range is only added once.
2026-01-31 12:46:29 +03:00
Mohit Bankar df0f3a9bd3 GUI: Preserve selection when shift-clicking
Prevent Shift+Click from clearing existing selections.
2026-01-31 12:46:29 +03:00
Mohit Bankar d32433346e GUI: Limit multi-selection to launcher dialog only
- Added _multiSelectEnabled flag to ListWidget and GridWidget (default: false)

- Added setMultiSelectEnabled() and isMultiSelectEnabled() methods

- Gated Ctrl+Click and Shift+Click logic behind _multiSelectEnabled check

- GroupedListWidget inherits this behavior from ListWidget
2026-01-07 01:01:47 +03:00
Mohit Bankar 9c53832087 GUI: Add multi-selection and range select to launcher grid
Implement multi-selection in the launcher grid:
• Ctrl + Click toggles selection of individual entries
• Shift + Click selects a contiguous range from the last to the current selection
• Selected entries are consistently stored in sorted order
• Removal confirmation dialog now shows user-friendly game names
• Improved modifier key handling for reliable Ctrl and Shift detection
2026-01-07 01:01:47 +03:00
sluicebox 2effd5865e GUI: Cleanup game removal code 2025-06-10 08:06:41 +03:00
Miro Kropacek 24dcacfe69 JANITORIAL: Add missing references to const function parameters
Applied to all 'const Common::' and 'const Graphics::' instances.
2025-04-13 02:20:09 +03: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 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
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
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
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
PushmePullyu 4c092c26ba GUI: GridWidget: Remove redundant scroll bar update
sortGroups(): Move the call to scrollBarRecalc() up and delete
superfluous code so the scroll bar is only updated once.
2023-09-03 21:39:01 +03:00
PushmePullyu 277de28b3e GUI: GridWidget: Update scroll bar position early in sortGroups()
Propagate changes in GridWidget::_scrollPos to
ScrollBarWidget::_currentPos before calling
ScrollBarWidget::checkBounds().

Fixes #14551
2023-09-03 21:39:01 +03:00
Le Philousophe a9bf813e86 GUI: Make thumbnail smaller than its background
This avoids the thumbnail to be drawn over the rounded borders
2023-07-04 21:23:43 +02:00
wyatt-radkiewicz 660fcf329d GUI: Collapsed game groups are persisted
GroupedListWidget and GridWidget can save what groups they have
collapsed to the config file and reload them. "launcher.cpp" uses those
functions to persist those collapsed groups through
  - changing how the games are grouped by
  - going from list to grid mode and vice versa
  - quitting scummvm and starting it again
2023-04-12 16:07:58 +02:00
Cameron Cawley fb2503d02e GUI: Only use a transparent colour for BMP images 2023-04-09 12:54:38 +02:00
Walter Agazzi 4b53b4f1aa GUI: Darken thumbnails of invalid entries
Applies a dark transparent overlay to the
games that are non-startable
2023-03-20 19:26:44 +01:00
Walter Agazzi 83b2ce00d7 GUI: Display titles in alternate color if unreachable 2023-03-20 19:26:44 +01:00
Miro Kropacek faeb24f037 GRAPHICS: SVGBitmap now inherits from ManagedSurface
Since the only use case for SVGBitmap is blitting it to a
ManagedSurface, combine both into one to avoid unnecessary allocation
and blitting.
2023-03-16 19:20:50 +01:00
Walter Agazzi f068d5a65d GUI: Add SVG loading for extras overlay 2023-01-20 19:09:55 +01:00
Walter Agazzi 70a2b2ac5f GUI: Improve comment, typo fix 2023-01-12 23:11:50 +01:00
Walter Agazzi 23aa5eeb31 GUI: Align flags using thumbnail size 2023-01-12 23:11:50 +01:00
Walter Agazzi d54daa0aee GUI: Try loading PNG flag if a vector isn't available 2023-01-12 23:11:50 +01:00
SupSuper ac771ac2de GUI: Fix engine icons only showing up in grid once 2022-10-04 01:37:28 +01:00
Le Philousophe 1d715c7bbb GUI: Fix memory leak when loading DEMO icon 2022-10-01 15:38:44 +02:00