Commit Graph

429 Commits

Author SHA1 Message Date
Misty De Meo
f208f8e00b
GUI: remove unused variable 2023-06-01 14:30:50 -07:00
Cameron Cawley
7ef8da53d7 GUI: Account for the scroll bar size in ScrollContainerWidget objects 2023-05-14 22:43:57 +02:00
hax0kartik
6a4e2b2694 GUI: Disable text selection in list widget 2023-04-14 14:10:20 +02:00
hax0kartik
bf0845a1d6 GUI: Modify inversion only if text selection is not disabled 2023-04-14 14:10:20 +02:00
hax0kartik
4d10720b5e GUI: Do not modify inversion directly in editable widget 2023-04-14 14:10:20 +02:00
hax0kartik
337960dc5f JANITORIAL: Remove trailing whitespaces in editable.cpp 2023-04-14 14:10:20 +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
Donovan Watteau
b9e7168d01 GUI: Fix -Wimplicit-fallthrough warning with GCC on OSX 2023-04-11 11:06:23 +02:00
Cameron Cawley
fb2503d02e GUI: Only use a transparent colour for BMP images 2023-04-09 12:54:38 +02:00
Thierry Crozat
b1fcd15cad GUI: Allow scaling dialog and widget sizes in constructors
The resize() function has the option to do the scaling, but
adding it to the construtor avoids having to then call resize().
Also this makes more explicit that by default the sizes are not
scaled. The reason for not scaling by default is because values
with get from the ThemeEngine are already scaled.
2023-03-25 11:27:02 +01: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
hax0kartik
e101f5397c GUI: Limit text selection feature for RTL languages 2023-03-01 18:42:34 +01:00
hax0kartik
8dcf2ec58e GUI: Add selection rendering function to EditTextWidget
This code has been written by @sev-
TODOs:
    1. Investigate and fix characters jumping/shaking during selection.
    2. Make code compatible with RTL languages such as hebrew.
2023-03-01 18:42:34 +01:00
hax0kartik
bd52062fa7 GUI: Make text selectable 2023-03-01 18:42:34 +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
Cameron Cawley
9728584687 GUI: Automatically extend the width of single column pop-up dialogs 2022-12-25 16:26:26 +01:00
Roberto Sánchez
75231868db GUI: Place empty metadata games last when sorting 2022-12-08 23:19:45 +01:00
Vladimir Serbinenko
f9d0da86e3 GUI: Fix browsing in presence of files with \1 in names
Currently file containing \1 in its name causes erroring out
with "Wrong string format".

Hades Challenge Mac partiton has such files in the root. So if they are
copied then it's impossible to select folder with Hades Challenge. Many tools
skip (as they are hidden) or rename them while saving original name in
AppleDouble or MacBinary. dumper-companion also renames them but scummvm
transparently decodes punycode back.
2022-11-06 23:22:40 +01:00
Orgad Shaneh
aba347ed9e GUI: Make character validation less ugly 2022-11-02 22:15:16 +00:00
Hubert Maier
25bc55d83f
GUI: Correct spelling mistake
loose -> lose
2022-10-27 15:56:06 +02: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
Le Philousophe
aa5da2e140 GUI: Don't pass U32String by value 2022-09-18 16:15:56 +02:00
Eugene Sandulenko
6e4860343c GUI: Avoid dupicate icon loading 2022-09-02 14:59:29 +02:00
Niv Baehr
75dfe12286 GUI: TTS: strip GUI formatting before reading list item 2022-08-29 08:34:48 +03:00
Le Philousophe
763517fdfe GUI: Make GridWidget accept focus
This avoids the filter text to take the focus.
In Android this prevents the launcher to start with the virtual keyboard
displayed.
In the future, the widget could also take keyboards event into account
like the ListWidget one.
2022-08-27 09:19:53 +02:00
Walter Agazzi
f428b2a12f
GUI: Add overlay to show demo status on thumbnails 2022-08-27 01:15:19 +03:00
Le Philousophe
ea560b5dab GUI: Redraw editable widget and move its caret when text is set by code 2022-08-25 17:57:38 +02: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
BLooperZ
b67b88e6d9 GUI: Support unicode and BiDi in editable widget 2022-08-02 22:04:54 +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
antoniou79
dc69bd4d67 GUI: Fix infinite loop with mouse wheel over tab
Reported as regression in #13106

Comment link:  https://bugs.scummvm.org/ticket/13106#comment:4
2022-06-29 15:54:06 +03: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
Eugene Sandulenko
84a17741b6
GUI: Fix grid list highlight after editing game. Bug #3960 2022-06-10 01:00:07 +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
Eugene Sandulenko
29f3e570c3
GUI: Fix editing of colored string in List. Bug #13541 2022-06-09 19:16:36 +02:00
Torbjörn Andersson
8b94209d36 GUI: Fix caret position in list widget
Strip formatting from the list widget string before taking the length of
it to calculate the caret position. This can be seen e.g. in the save
dialog when not using the icon view.
2022-06-07 08:52:13 +02:00
Le Philousophe
293a08df76 GUI: Fix in vs int32 discrepancies 2022-06-02 22:44:11 +02:00