Commit graph

36 commits

Author SHA1 Message Date
Hubert Maier
25bc55d83f
GUI: Correct spelling mistake
loose -> lose
2022-10-27 15:56:06 +02: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
antoniou79
8fcfb7e585 GUI: Fix bad EditTextWidget rect at low window widths
Fix bug https://bugs.scummvm.org/ticket/13339

Solution is taken from our ListWidget (gui/widgets/list.cpp) which performs a similar check in its ListWidget::getEditRect()
2022-03-06 09:01:50 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
109beb4f86 GUI: Explicitely use Common:: namespace 2021-11-12 14:46:34 +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
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
f800ca4ada GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes.

- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format
2020-08-30 14:43:41 +02:00
aryanrawlani28
5f2af6b93e GUI: U32: Add u32 support to Editables and Dialogs
- Editable widgets
- Lists
- SaveLoad Dialogs
- Browser Dialogs
2020-08-30 14:43:41 +02:00
aryanrawlani28
5a093e4e95 GUI: RTL: Improve right align text drawing
- Fix last chars being eaten
- Add support for input in right-align mode editables
- Fix issue with dirtyness of editables after clicking
- Improve spacing for lists and popup
- Make numbers reversed in lists
2020-06-22 00:03:02 +02:00
aryanrawlani28
c2708e350f GUI: RTL: Change alignment of editable to right in RTL 2020-06-22 00:03:02 +02:00
Bastien Bouclet
eb28c5a092 GUI: Use a dialog theme layout for the unknown game dialog 2020-01-04 10:56:25 +01:00
Alexander Tkachev
c47b204ac3 GUI: Minor offsets fixes in Tooltip and EditTextWidget 2019-08-03 04:35:48 -04:00
Alexander Tkachev
99c2418d1a GUI: Rewrite Cloud tab
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
2019-07-30 14:51:41 -04:00
Thierry Crozat
63a6a3c3de GUI: show/hide virtual keyboard when the EditTextWidget gains/loses the focus 2019-02-16 17:20:57 +00:00
Bastien Bouclet
ac4b2efd3f GUI: Clean up file browser path entry 2018-08-27 06:39:40 +02:00
Chatziargyriou Eleftheria
4188ba1252 GUI: Add editable path in file browser dialog 2018-08-22 00:39:51 +01:00
Bastien Bouclet
4d29ce21d0 GUI: Unify clip and non-clip draw calls 2018-04-19 19:18:39 +02:00
Bastien Bouclet
0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +01:00
Alexander Tkachev
3d636617d0 GUI: Use clipping everywhere 2016-07-03 12:24:46 +02:00
Eugene Sandulenko
b590cc2d8f GUI: Cleanup class initialization 2016-06-01 13:16:12 +02:00
Eugene Sandulenko
6f44d4f7e1 GUI: Make disabled EditTextWidget not allowing to edit the string 2015-11-07 13:26:55 +01:00
Filippos Karapetis
0d81e522c1 GUI: Remove trailing whitespace 2014-10-28 15:38:51 +02:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Johannes Schickel
e036aa76da GUI: Fix EditTextWidget::getEditRect's returned height. 2013-11-24 00:15:48 +01:00
Narek Mailian
887a99e211 GRAPHICS: Added changes and improved code from inisider/scummvm (partial text)
Includes code from https://github.com/inisider/scummvm/ , which has been
squashed and bugfixed
2013-08-16 20:54:08 +02:00
Chris Warren-Smith
be399188c4 TIZEN: bada port updated to tizen 2013-07-03 07:04:11 +10:00
Johannes Schickel
73df649fd6 GUI: Let edit text widgets use a non-bold (aka normal) font.
This change was done per request of _sev.
2012-02-25 18:52:47 +01:00
Johannes Schickel
9f3fbe1bd7 GRAPHICS/GUI: Implement kerning support for Font.
This adapts the related graphics code, which is the generic Font API and the
TTF font implementation.

It furthermore adapts the GUI to properly take care of kerning in text input
widgets.
2012-01-29 16:26:20 +01:00
Johannes Schickel
7022cdc82b GUI: Slight formatting fix. 2011-10-27 01:02:25 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Eugene Sandulenko
6224b74f34 GUI: Let EditTextWidget notify when the editing is finished 2011-04-16 16:18:59 +03:00
Max Horn
f3f73a7832 GUI: Commit some changes missing in my previous commit (oops)
svn-id: r54266
2010-11-16 10:24:16 +00:00
Max Horn
427dc1ae93 GUI: Move major widgets to new directory gui/widgets
Also renamed the source/header files, now they are more closely
aligned to how we rename most other source files

svn-id: r54264
2010-11-16 10:11:57 +00:00
Renamed from gui/EditTextWidget.cpp (Browse further)