aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
AgeCommit message (Collapse)Author
2018-03-12GUI: Remove the ThemeItem draw queuesBastien Bouclet
Drawing nows happens directly when the Dialog or Widget draw methods are called. This makes it easy to debug why a particular low level draw method was called, by inspecting the call stack. This replaces the notion of "buffering" by two independant ways to control what is drawn and where: - The active layer is used to select whether the foreground or background part of the dialogs are rendered by the draw calls. - The active surface is used to select if the draw calls affect the back buffer or the screen. The foreground layer of the active dialog is drawn directly to the screen. Its background layer is drawn to the back buffer. This way widgets can restore the back buffer in order to update without having to redraw the dialog's background. Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-01-27GUI: Fix the caret drawing over the scroll bar in the list widgetBastien Bouclet
Also remove the unused linesWidth variable and fix the hlLeftPadding and hlRightPadding widget attributes to actually work. There are still issues remaining with the caret in the list widget due to the ellipsis being used to shorten long text. Ellipsis is accounted for when drawing the text but not when computing the caret position.
2018-01-27GUI: Remove Dialog::markAsDirty to expose full GUI redrawsBastien Bouclet
2018-01-27GUI: Remove explicit redraw when scrolling the ScrollContainerBastien Bouclet
The redraw is already handled by the GUI main loop
2018-01-27GUI: Implement dirty-checking for widget redrawsBastien Bouclet
2017-08-06GUI: Mark some fall-through cases as intentionalBastien Bouclet
Comments explain how the num lock handling works before the fall-through cases.
2017-04-06GUI: Add method to know if a widget contains a given widgetThierry Crozat
2017-03-01GUI: Increase tab title spacingWillem Jan Palenstijn
2017-02-28GUI: Give each tab in TabWidget its own widthWillem Jan Palenstijn
The width of each tab is now computed from its title, independently of the other tabs. This increases the number of tabs that fit on the screen. This rewrite also fixes a bug where if the window size increased while _firstVisibleTab > 0, some tabs would become inaccessible when the scroll buttons were hidden. The layout key Globals.TabWidget.Tab.Width is now treated as minimal tab width. This is set so that the tabs fit reasonably well in lowres layouts. At the same time, this reduces the lowres scroll buttons heights to fit. This patch makes the Nintento DS hacks in TabWidget obsolete. (Hopefully! I'm not able to test.)
2017-02-22SDL: Fix erratic analog pointer + control optionsrsn8887
Fixes erratic speeds in analog pointer motion Implemented option to set analog/keyboard pointer speed and control the analog joystick deadzone. The deadzone option appears only if the build supports analog joystick (via JOY_ANALOG define)
2016-10-30GUI: Setting the active tab also ensures it is visible in the tab barThierry Crozat
2016-10-22GUI: Fix possible access to free'ed memory or double deletion in tab widgetThierry Crozat
The issue could occur when adding or removing widgets to a tab, and then not switching to a different tab before the destructor or reflowLayout() were called. In such a case the firstWidget of the current widget in the _tabs list could be out of date. Accessing this first widget from the destructor or from reflowLayout() could then cause a crash, or random issues caused to access to free'ed memory. In theory this could also lead to a memory leak, although I don't think this could occur in our current code. Usually we add several tabs to a TabWidget and then switch back to the first tab after building all the tabs. So in such a case the issue would not occur. But because we are deleting and reconstructing the clear buttons for the MIDI and Path tabs of the options dialog from reflowLayout(), if the current tab is the Path tab, it would be kept as active tab after adding and removing widget to it and the issue would occur. This fixes bug #9618.
2016-08-24ALL: Move Clipboard support to OSystemAlexander Tkachev
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-24JANITORIAL: Remove spaces at the end of the lineAlexander Tkachev
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
2016-08-24GUI: Add Ctrl+V handling in EditableWidgetAlexander Tkachev
In SDL2 there is SDL_GetClipboardText(), so EditableWidget could support pasting into it. No copying yet, as there is no selecting.
2016-08-24GUI: Minor Container fixesAlexander Tkachev
I should've done these in PR, I guess.
2016-08-24GUI: Fix Container's visibility issueAlexander Tkachev
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-07-22GUI: Fix regression in multicolumn PopUp widgetEugene Sandulenko
2016-07-12GUI: Fix TabWidget height issuesAlexander Tkachev
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-03JANITORIAL: Remove trailing spacesAlexander Tkachev
2016-07-03GUI: Use clipping everywhereAlexander Tkachev
2016-07-03GUI: Fix PopUpDialogAlexander Tkachev
2016-07-03GUI: Add drawTabClip()Alexander Tkachev
2016-07-03GUI: Add drawSquareClip()Alexander Tkachev
2016-07-03GUI: Add VectorRendererSpec::drawTriangleClip()Alexander Tkachev
2016-07-03GUI: Add ThemeLayoutTabWidgetAlexander Tkachev
2016-07-03GUI: Fix Dialog's and TabWidget's reflowLayout()Alexander Tkachev
2016-07-03GUI: Hide scrollbar in ScrollContainerWidget when neededAlexander Tkachev
2016-07-03GUI: Fix ScrollContainerWidget's reflowLayout()Alexander Tkachev
2016-07-03GUI: Update ScrollContainerWidgetAlexander Tkachev
2016-07-03GUI: Fix ScrollContainerWidget look a bitAlexander Tkachev
2016-07-03GUI: Make ScrollContainerWidget do full redrawAlexander Tkachev
2016-07-03GUI: Make ScrollContainerWidget hide childrenAlexander Tkachev
2016-07-03GUI: Make PopUpWidget clipAlexander Tkachev
2016-07-03GUI: drawRoundedSquareClip()Alexander Tkachev
2016-07-03GUI: Remove _clippingArea from ScrollContainerAlexander Tkachev
2016-07-03GUI: Cleanup in ScrollContainerAlexander Tkachev
2016-07-03GUI: Add ScrollContainerAlexander Tkachev
2016-06-01GUI: Cleanup class initializationEugene Sandulenko
2016-05-02GUI: Initialize widget paddingEugene Sandulenko
2016-03-30GUI: Implement immediate coordinate mode for PopUp widgetEugene Sandulenko
2015-11-07GUI: Make disabled EditTextWidget not allowing to edit the stringEugene Sandulenko
2014-10-28GUI: Remove trailing whitespaceFilippos Karapetis
2014-04-06GUI: Tab cycling handles multiple themes.Zerophase
First visible tab moves up when a theme's width cannot fit another tab.
2014-04-01GUI: Fix tab cycling when total tabs increase.Zerophase
Tab cycling ignores tab width, and slides correctly for larger tab counts.
2014-04-01GUI: Add Tab cycling to TabWidgetZerophase
Tab and Shift-Tab can now cycle between each Tab of the Edit Game menu.
2014-02-18GUI: Make GPL headers consistent in themselves.Johannes Schickel
2013-11-24GUI: Do not draw text outside edit rect in EditableWidget.Johannes Schickel
2013-11-24GUI: Fix undrawing caret glitch when the edit text is inversed.Johannes Schickel
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-24GUI: Document EditableWidget::getEditRect.Johannes Schickel