Commit Graph
412 Commits
Author SHA1 Message Date
av-dx 23ecdf5a54 GUI: Refactor entry assignment into a function 2021-11-12 14:46:34 +01:00
av-dx a643f12eab GUI: Free up original images after loading thumbs 2021-11-12 14:46:34 +01:00
av-dx bf7c05b265 GUI: Load a placeholder thumb 2021-11-12 14:46:34 +01:00
av-dx 0e71bdc67f GUI: Use grid padding from theme. 2021-11-12 14:46:34 +01:00
av-dx 512105678b GUI: Add responsive handling to tray 2021-11-12 14:46:34 +01:00
av-dx 422b93586c GUI: Implement scroll through scroll bar. 2021-11-12 14:46:34 +01:00
av-dx 68bec2375d GUI: Pass the cmds from tray to launcher dialog 2021-11-12 14:46:34 +01:00
av-dx ae6835b2f9 GUI: Add tray icons 2021-11-12 14:46:34 +01:00
av-dx 5552454bce GUI: Formatting and documentation of code. 2021-11-12 14:46:34 +01:00
av-dx aed54e4300 GUI: Add a non-interactive scroll bar 2021-11-12 14:46:34 +01:00
av-dx fa5e0d5674 GUI: Test out tray dialog to lauch games. 2021-11-12 14:46:34 +01:00
av-dx 4bc9c6165c GUI: Add highlight on hover to grid items 2021-11-12 14:46:34 +01:00
av-dx 58b50c7f96 GUI: Calc idx of first visible entry outside calcVisibleEnties() 2021-11-12 14:46:34 +01:00
av-dx 801fde51c7 GUI: Render flags to represent language 2021-11-12 14:46:34 +01:00
av-dx 0e78cef7a4 GUI: Correct calculation for total number of rows 2021-11-12 14:46:34 +01:00
av-dx 88d2564d4e GUI: Fix wrong position of widgets on resize 2021-11-12 14:46:34 +01:00
av-dx b24bbbca33 GUI: Shift entire grid while scrolling. 2021-11-12 14:46:34 +01:00
av-dx 5bbcaa534e GUI: Pass the scroll event from GridItem to GridWidget 2021-11-12 14:46:34 +01:00
av-dx d37086ac56 GUI: Replace GridItem component widgets with drawSurface() 2021-11-12 14:46:34 +01:00
av-dx 585313edd1 GUI: Adjust spacing when resizing to justify items 2021-11-12 14:46:34 +01:00
av-dx c4fd0220c5 GUI: Read few layout variables from theme 2021-11-12 14:46:34 +01:00
av-dx 6a57173c5a GUI: Moved Grid widgets to separate files. 2021-11-12 14:46:34 +01:00
lb_ii 498f0ac8aa GUI: Extend ListWidget to use custom filter matchers 2021-11-01 15:29:34 +01:00
Le Philousophe 58c5c29f88 Revert "GUI: Fix int/int32 build failures"
This reverts commit c2bd0cfb90.
2021-07-07 19:10:32 +02:00
Le Philousophe c2bd0cfb90 GUI: Fix int/int32 build failures
All of this is because Rect and Surface have moved to int32
2021-07-05 23:21:55 +02:00
Fiodar 1db270c4cd GUI: Fix warnings for header search failure
WARNING: Can't find following headers in User or System Include Paths "scrollbar.h"
2021-06-26 08:44:55 +03:00
Le Philousophe aa9cbdc6ab GUI: Fix invalid rect when list width goes too small 2021-06-20 13:33:38 +02:00
sluicebox aac1eb12bf GUI: Add delete/backspace support to save/load list
- SaveLoadChooserSimple responds to kListItemRemovalRequestCmd
- ListWidget::scrollToCurrent() only scrolls when there is a
  current selected item
2021-05-28 23:15:04 +03:00
Martin Gerhardy 9d82fa51df COMMON: removed USE_TTS check from engines
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
2021-05-03 14:13:41 +03:00
Eugene Sandulenko eda31b9498 GUI: Initialized more variables 2021-05-01 01:49:47 +02:00
SupSuper b3fd7c524d GUI: Recalculate tab variables consistently 2021-04-24 21:10:00 +01:00
Thierry Crozat 97f8a4e42e GUI: Fix getEditRect and implify rect handling in EditTextWidget
The same rect was hardcoded in three different places. Now it is
only in getEditRect and the other places use getEditRect.

There were actually differences between the rect width, but I put
that down to a bug in getEditRect. I see no reason to define the
right position of the rect as w - 2 - right_padding - left_padding.
Substracting the left padding would make sense if we were
specifying the rect width, but the Common:Rect constructor takes
the rect right location and not the width. There might have been
a confusion on that point by the developer who wrote that code
years ago. Also has the bottom right point is excluded, we should
only remove 1 and not 2.

This width that was smaller than it should be might have been the
reason why 6 additional pixels were arbitrarily added to the rect
passed to setTextDrawableArea later on.

There were actually
2021-04-22 01:40:12 +01:00
Thierry Crozat ba0dabd5ca GUI: Fix position of character after caret
There was a discrepency in the vertical position of the text in
the drawText call on one hand, and in the getEditRect() and rect
passed to setTextDrawableArea() on the other. This discrepency
was introduced in commit c47b204ac. Since getEditRect() is used
in EditableWidget::drawCaret() to draw the character after the
caret (when erasing the caret) this caused this vertical shift.

This fixes bug #12336.
2021-04-22 01:40:12 +01:00
Eugene Sandulenko 9113f24120 GUI: Fix tab dimensions on resize 2021-04-13 02:13:20 +02:00
Eugene Sandulenko 5d6941f8b2 GUI: Move hardcoded tab title spacing to themes
This fixes HiDPI tabs rendering.
2021-04-11 21:21:44 +02:00
Eugene Sandulenko 493a343e6a GUI: Avoid double scaling for scrollbar and tab navbuttons 2021-04-11 21:21:44 +02:00
Cameron Cawley a82b200ae7 GUI: Allow specifying a command for PopUp widgets 2021-01-10 09:53:43 +02:00
Torbjörn Andersson 20e09e6d56 GUI: Fix crash in setSelected() when the list index is empty
If the list is filtered, but _listIndex is empty, setSelected() would
trigger trigger an assertion because it tried to use the index value
from the unfiltered list. This would happen in the ScummVM launcher if
you filtered the list and then edited the game titles until nothing
matched your search condition any more.

Instead of checking if there is a filtered list, check if there is a
filter or not. That should hold true whether or not the filter actually
matched anything.
2020-12-29 23:31:07 +00:00
Cameron Cawley c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00
Vladimir Serbinenko 29cfa7bb0f COMMON: Merge code for str.cpp and ustr.cpp
Most of the code in str.cpp and ustr.cpp is actually the same. Do some
template magic to merge them.
2020-10-31 14:05:30 +01:00
Thierry Crozat 982ecb4f93 GUI: Fix use of uninitialized variable in ListWidget constructor
The _scrollBarWidth variable was used (to create the ScrollBarWidget)
before it was initialized.
2020-09-10 00:34:45 +01:00
aryanrawlani28 2ca907b4a2 GUI: U32: Use game-list filters with u32
- Add a contains utility function to ustr
- setFilter uses U32String and U32Tokenizers
- Make consequent changes in launcher to allow sending u32strings
2020-08-30 14:43:41 +02:00
aryanrawlani28 68d01321d6 GUI: U32: Downscale changes of U32, fix review issues
This commit addresses a range of changes, within scummvm subproject.

- Audio files, like mididrv, remove U32String based name and identifier, because ASCII only.
- mididrv.cpp had some wrong format for warning messages, fix those
- Message dialogs were modified to use default arguments more often, but reverting back to the orignal to minimize changes.
- SetTooltip has a fake constructor that takes in a string, and use it.
- U32Format had some break statements missing, add those.
- RemapWidget: Use fake constructor for setLabel and setTooltip, to make minimal changes
- SDL: setting text in clipboard no longer uses SDL_iconv_string
- TTS: Override base class "say" with strings, so tts->say can be used with normal strings too.
- About dialog: fix incorrect code for u32string variables
- Fix some extra brackets
- Some buttons were incorrectly removed from using translated labels, revert those
- Message Dialog: Pass default and alt buttons as const references
- Saveload Dialog: Use translations in missing places, use const-references. Also, use translations in a correct manner.
- Use const references for tooltip in GraphicsWidget, EditTextWidget, error.cpp
- DomainEditTextWidget: Use U32String for text
2020-08-30 14:43:41 +02:00
aryanrawlani28 4b6976c558 GUI: U32: Reduce number of files changed and fixes
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.

- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
2020-08-30 14:43:41 +02:00
aryanrawlani28 d3e64b2df4 GUI: U32: Use const-references for tooltips 2020-08-30 14:43:41 +02:00
aryanrawlani28 4506bcd9f3 GUI: U32: Fix compilation errors
After rebasing to get even with master, some compilation errors occured. This commit fixes that.
2020-08-30 14:43:41 +02:00
aryanrawlani28 ef7ec444d3 GUI: U32: Enable u32 for tts (Windows)
They always take in U32 strings now.

- Revert tts descriptions to string, they don't use translations, so better to keep it as strings.
- Make read() take in const U32 references.
2020-08-30 14:43:41 +02:00
aryanrawlani28 d4d5b8906e GUI: U32: Begin making TTS take in U32Strings for saying
Only for strings without an explicit action. The first level takes in a u32 string, encodes it, and passes it along further with the default action

- For gui widgets, the strings are passed in as native u32 strings.
- For everything else, they are being converted to u32 by Common::convertToU32... and then being passed along
2020-08-30 14:43:41 +02:00
aryanrawlani28 49c36c2b45 GUI: U32: Begin converting texts in clipboards to u32strings
With this commit the base class variables and the parts where getClipboard and setClipboard are used is changed accordingly.
2020-08-30 14:43:41 +02:00
aryanrawlani28 160a1320cc GUI: U32: Rename more temp code and fix issues
- Remove convertFromU32.. where necessary
- Replace convertFromU32 to .encode() for better readability
- Fix spacing issues in tabs
- Fix spacing issues in popups
- Fix weird font rendering in certain menus.
- Fix dialog changing sizes by huge amount when changing languages
- Some minor changes from String::format to U32String::Format
2020-08-30 14:43:41 +02:00