Commit Graph
177 Commits
Author SHA1 Message Date
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
Eugene Sandulenko 6e4860343c GUI: Avoid dupicate icon loading 2022-09-02 14:59:29 +02:00
Walter Agazzi f428b2a12f GUI: Add overlay to show demo status on thumbnails 2022-08-27 01:15:19 +03:00
Le Philousophe def0624ee9 GUI: Fix memory leak when resizing grid widget 2022-08-25 17:57:38 +02:00
Le Philousophe 9af7ecdd15 GUI: Do hide GridItemWidgets when nothing is to be shown 2022-08-24 22:46:55 +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
antoniou79 d7dcce6901 GUI: Fix mouse wheel on grid item tray
When using the mouse wheel (scroll up/down) in the Grid view, item tray for a selected game, ScummVM would exit

I didn't notice any side-effects from the fix, but someone more familiar with the code should confirm.
2022-07-02 12:03:05 +02:00
Thierry Crozat 715492b3ca GUI: Fix crash in GridWidget when adding game to grid launcher
The crash was not systematic but occured in the case where adding
the game did not change the indexes for the first and last visible
items. The issue was that in setEntryList() was called it did not
cleat the _visibleEntryList array that still contained dangling
pointers to the old items in the _dataEntryList. In most cases
the _visibleEntryList would be updated with pointers to the new
items when calcVisibleEntries() was called from reflowLayout(),
before being used in assignEntriesToItems() (also called from
reflowLayout()). But if the indexes of the first and last visible
items did not change, _visibleEntryList was not updated and we
got a crash in assignEntriesToItems() when trying to access freed
memory.
2022-06-21 00:33:24 +01:00
Thierry Crozat 5ea034391b GUI: Add slider for Grid Launcher icon size 2022-06-12 22:08:53 +01:00
Le Philousophe 6a3e97d863 GUI: Fix dangling pointer when _headerEntryList was reallocated
As we know the size of the array in advance we can preallocate it.
2022-06-10 07:52:46 +02:00
Le Philousophe 507aaae0bd GUI: When resizing grid make sure selected entry is displayed
Without this, at startup, the grid is not scrolled on the selected game.
2022-06-10 00:52:14 +02:00
Le Philousophe b94ad4d8b8 GUI: Implement setSelected in Grid and use it in launcher 2022-06-10 00:52:14 +02:00
Le Philousophe d2f327921c GUI: Don't store GridItemInfo items twice 2022-06-10 00:52:14 +02:00
Le Philousophe ab87383f56 GUI: Apply filter even when changing sorting criteria 2022-06-10 00:52:14 +02:00
Le Philousophe 293a08df76 GUI: Fix in vs int32 discrepancies 2022-06-02 22:44:11 +02:00
Thierry Crozat 7e69686855 GUI: Fix crash when clicking on item in grid widget
The tray position was not correctly computed and it was most of the
time trying to display it way outside the window (it was using X
instead of Y in one place for the vertical position).

This was a recent regression from a6bc1d587 (GUI: Fixed grid view
for long games list).
2022-06-02 20:49:06 +01:00
Thierry Crozat d3ae365f18 GUI: Fix grid items being twice as small on HiDPI screens with OpenGL mode 2022-06-02 20:34:27 +01:00
Eugene Sandulenko a6bc1d5876 GUI: Fixed grid view for long games list
We used Common::Rect which uses in16 for its members. Lomger lists
exceeded 32,768 in heights, thus, leading to negative numbers. As a result,
scrollbar was not showing up.
2022-06-02 17:40:42 +02:00
Eugene Sandulenko 4bd1053236 GUI: Properly reload flags/platforms when resolution is changed 2022-05-29 16:39:35 +02:00
SupSuper 22711c9d0d GUI: Show full game description in grid view tooltip 2022-04-02 05:52:06 +01:00
SupSuper 95f8fc1218 GUI: Handle grid fallback icons more gracefully
Always use the full ID as thumbPath
2022-04-01 08:11:03 +01:00
SupSuper 284c3936ed GUI: Fix grid game icons only showing once 2022-03-31 01:06:49 +01:00
SupSuper 10b085ee5f GUI: Render grid thumbnails correctly in different pixel formats 2022-03-29 05:29:13 +01:00
SupSuper dd4d8fc859 GUI: Add engine icon fallbacks to GridWidget thumbnails 2022-03-29 05:29:11 +01:00
Thierry Crozat 24cec3cd1b GUI: Fix use after free of surface in GridWidget
This happened after calling scaleGfx if the original surface was
already at the correct size. In such a case scaleGfx returns the
original surface, so it should not be freed.
2022-02-27 20:11:02 +00:00
SupSuper 57d0df273e GUI: Scale grid widget icons with filtering 2022-02-22 17:46:21 +00: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
Torbjörn Andersson 934567a87c GUI: Fix grid memory leaks
Clearing a HashMap doesn't delete the objects stored inside it, so do
that explicitly.
2021-11-16 13:34:17 +01:00