70 Commits

Author SHA1 Message Date
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
438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
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
2f5138f795 GUI: Minor Container fixes
I should've done these in PR, I guess.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9975307caf GUI: Fix Container's visibility issue
Now it respects outer code's decision to hide or move some widgets
around. Outer code must be CommandReceiver which is set as
ScrollContainer's target.
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
499e5ab3ea GUI: Fix regression in multicolumn PopUp widget 2016-07-22 14:36:00 +03:00
Alexander Tkachev
64a79fd1ab GUI: Fix TabWidget height issues
Changes theme stx files to specify TabWidget's type. That fixes wrong TabWidget height.

Changes TabWidget's getHeight() to return not only "children" height, but also tabs height. That fixes wrong clipping area.

Changes Widget's findWidget to use getHeight(). That fixes bug when widgets in the bottom of TabWidget were not reacting to the mouse events.
2016-07-12 22:37:57 +06:00
Alexander Tkachev
cea58cc61c JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
Alexander Tkachev
3d636617d0 GUI: Use clipping everywhere 2016-07-03 12:24:46 +02:00
Alexander Tkachev
dc9b32e620 GUI: Fix PopUpDialog 2016-07-03 12:24:28 +02:00
Alexander Tkachev
80412a4139 GUI: Add drawTabClip() 2016-07-03 12:22:10 +02:00
Alexander Tkachev
f22d11953d GUI: Add drawSquareClip() 2016-07-03 12:21:09 +02:00
Alexander Tkachev
559ca37daf GUI: Add VectorRendererSpec::drawTriangleClip() 2016-07-03 12:20:37 +02:00
Alexander Tkachev
0ae4409138 GUI: Add ThemeLayoutTabWidget 2016-07-03 12:20:03 +02:00
Alexander Tkachev
24963ac97d GUI: Fix Dialog's and TabWidget's reflowLayout() 2016-07-03 12:19:48 +02:00
Alexander Tkachev
421f9826c8 GUI: Hide scrollbar in ScrollContainerWidget when needed 2016-07-03 12:19:31 +02:00
Alexander Tkachev
40fa9b4de3 GUI: Fix ScrollContainerWidget's reflowLayout() 2016-07-03 12:19:15 +02:00
Alexander Tkachev
ac25acbccc GUI: Update ScrollContainerWidget 2016-07-03 12:18:52 +02:00
Alexander Tkachev
9c1eab6415 GUI: Fix ScrollContainerWidget look a bit 2016-07-03 12:18:34 +02:00
Alexander Tkachev
31e528c070 GUI: Make ScrollContainerWidget do full redraw 2016-07-03 12:17:43 +02:00
Alexander Tkachev
b946ef8598 GUI: Make ScrollContainerWidget hide children 2016-07-03 12:17:01 +02:00
Alexander Tkachev
fca0f0ed34 GUI: Make PopUpWidget clip 2016-07-03 12:16:43 +02:00
Alexander Tkachev
8f2d35b0b8 GUI: drawRoundedSquareClip() 2016-07-03 12:16:26 +02:00
Alexander Tkachev
34af71a8ef GUI: Remove _clippingArea from ScrollContainer 2016-07-03 12:14:23 +02:00
Alexander Tkachev
9bf2d65dd2 GUI: Cleanup in ScrollContainer 2016-07-03 12:13:57 +02:00
Alexander Tkachev
49caaf77a1 GUI: Add ScrollContainer 2016-07-03 12:10:56 +02:00
Eugene Sandulenko
b590cc2d8f GUI: Cleanup class initialization 2016-06-01 13:16:12 +02:00
Eugene Sandulenko
bf06b3bc18 GUI: Initialize widget padding 2016-05-02 15:19:07 +02:00
Eugene Sandulenko
35a44edca1 GUI: Implement immediate coordinate mode for PopUp widget 2016-03-30 19:02:02 +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
Zerophase
5c12e09ed1 GUI: Tab cycling handles multiple themes.
First visible tab moves up when a theme's width cannot fit another tab.
2014-04-06 19:58:56 -05:00
Zerophase
5df3c14eba GUI: Fix tab cycling when total tabs increase.
Tab cycling ignores tab width, and slides correctly for larger tab counts.
2014-04-01 07:28:57 -05:00
Zerophase
80d34a8a7c GUI: Add Tab cycling to TabWidget
Tab and Shift-Tab can now cycle between each Tab of the Edit Game menu.
2014-04-01 07:28:48 -05: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
95f07fd405 GUI: Document EditableWidget::getEditRect. 2013-11-24 00:20:29 +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
Johannes Schickel
e036aa76da GUI: Fix EditTextWidget::getEditRect's returned height. 2013-11-24 00:15:48 +01:00
Johannes Schickel
129e891a87 GUI: Fix ListWidget::getEditRect's returned height. 2013-11-24 00:15:47 +01:00
D G Turner
62d07700b3 GUI: Fix missing initializers for ListWidget. CID 1002259. 2013-09-30 04:53:17 +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
a41457e224 GUI: Always try to show as many entries as possible in ListWidget.
In case there were less items in the list than on a page, it was possible
that a "scrollTo" call scrolled items out of the view even though all could
be displayed. This caused odd behavior in the load dialog in T7G. There
the list contains 10 entries. In case the last one was loaded via the dialog,
the next time it was brought up again it showed the 9th entry at the top
of the view and effectively hiding all the others. It furthermore did not
show the scroll bar because all entries would have fit onto one page.

To prevent this odd behavior, a boundary check has been added to all places
where the scroll position is set. This has been taken from "scrollToCurrent"
which already tried to prevent this.

This fixes the second issue described in bug #3610960
"T7G - savegame glitches".
2013-04-16 23:25:04 +02:00
Torbjörn Andersson
5b09c1c8e3 GUI: Don't allow changing disabled popup widgets with mouse wheel
This was another inconsistency between changing the widget by
clicking and changing it with the mouse wheel. Hopefully the last
one, though.
2012-12-27 10:37:02 +01:00
Torbjörn Andersson
ba182faeaf GUI: Notify when popup widget changes by mousewheel
This is consistent with the notification when the widget changes by
clicking. As far as I can tell, that notification was added shortly
before mouse wheel handling was added. It missing from the mouse
wheel handler was presumably just an oversight.
2012-12-27 10:30:52 +01:00
Torbjörn Andersson
61b25b9707 GUI: Redraw the popup widget when a the selection changes
Otherwise, it will look like the value hasn't changed until the
widget is redrawn for other reasons, e.g. by mouse-over.

Incidentally, does anyone know why handleMouseDown() calls
sendCommand() when the selection changes, while handleMouseWheel()
does not?
2012-12-27 02:21:24 +01:00