Commit graph

41 commits

Author SHA1 Message Date
Orgad Shaneh
aba347ed9e GUI: Make character validation less ugly 2022-11-02 22:15:16 +00: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
BLooperZ
b67b88e6d9 GUI: Support unicode and BiDi in editable widget 2022-08-02 22:04:54 +02:00
Thunderforge
fd129ebc0c JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).

Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +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
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
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
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
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
2a239efa80 GUI: Always mark editable as dirty when press home or end
- Before, the implementation used to fetch this value based on setCaretPos.
- That would return true only if string needed scrolling.
- Thus, the small issue arised that 2 chars would be wobbled together. This commit fixes that.
2020-07-25 00:32:34 +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
aryanrawlani28
0420dc4f6d GUI: Fix review issues, code cleanup 2020-06-22 00:03:02 +02:00
aryanrawlani28
1bd2701597 GUI: RTL: Fix caret position 2020-06-22 00:03:02 +02:00
Cameron Cawley
014bef9eab BACKENDS: Add a default clipboard implementation 2019-09-21 22:16:01 +03:00
Thierry Crozat
6ab6d76792 GUI: Add copy to clipboard shortcut for EditableWidget 2018-04-29 21:47:10 +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
b9bba9bd4b ALL: Move Clipboard support to OSystem
Commit adds kFeatureClipboardSupport. hasTextInClipboard() and
getTextFromClipboard().

OSystem_SDL has this feature if SDL2 is used.

EditableWidget and StorageWizardDialog use g_system to access clipboard
now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
75fbecf616 GUI: Add Ctrl+V handling in EditableWidget
In SDL2 there is SDL_GetClipboardText(), so EditableWidget could support
pasting into it.

No copying yet, as there is no selecting.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3d636617d0 GUI: Use clipping everywhere 2016-07-03 12:24:46 +02:00
Alexander Tkachev
f22d11953d GUI: Add drawSquareClip() 2016-07-03 12:21:09 +02:00
Eugene Sandulenko
6f44d4f7e1 GUI: Make disabled EditTextWidget not allowing to edit the string 2015-11-07 13:26:55 +01:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Johannes Schickel
fe7f28bf6c GUI: Do not draw text outside edit rect in EditableWidget. 2013-11-24 01:15:27 +01:00
Johannes Schickel
b487c1fc38 GUI: Fix undrawing caret glitch when the edit text is inversed.
This is prominently visible in the list based save/load chooser since the
edit string is drawn on a special green background there. When the caret is
at the end of the edit string this would result in the green color missing
at the place of the (undrawn) caret. To avoid this we simply draw a fake
space now.
2013-11-24 00:38:47 +01:00
Johannes Schickel
3be846cfd7 GUI: Draw caret over the whole height of the edit rect.
This improves the look of the editable widgets.
2013-11-24 00:15:48 +01:00
Johannes Schickel
bb4a730a88 GUI: Fix out-of-bounds check in EditableWidget::drawCaret.
The line "y + editRect.height() + 2" is not included in drawing anymore. Thus
it is allowed to equal EditableWidget::_h.
2013-11-24 00:15:48 +01:00
Johannes Schickel
aaad08c9fe GUI: Fix character redrawing behind caret in EditTextWidgets.
This fixes an ugly y position change when the caret is moved to a character in
an edit text widget.
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
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
Max Horn
52d81727a3 GUI: Trying to clarify my comment on ctrl-a/ctrl-e *sigh* 2011-05-17 16:27:10 +02:00
Max Horn
29851abaea GUI: Text editing tweaks
- Streamline keypad handling
- Allow up/down to act like home/end
- On Mac OS X, allow ctrl-a and ctrl-e to act like home/end
2011-05-17 12:23:55 +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
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/editable.cpp (Browse further)