aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
AgeCommit message (Collapse)Author
2020-01-04GUI: Use a dialog theme layout for the unknown game dialogBastien Bouclet
2020-01-04GUI: Introduce dynamic layoutsBastien Bouclet
Prior to this change, a GUI layout was only affected by the screen size. Now, a layout can additionally be influenced by the GUI dialog and widgets that uses it. This capability is leveraged to implement the following features: * Layout elements that are not bound to a GUI widget do not take space. This means that dialogs where the widgets shown depend on for example a feature being enabled at configure time no longer have blank spaces. * Widgets can define a minimal required size for their contents not to be cut. For now this is only used for buttons so their width is always sufficient for their caption not to be cut. This mechanism could be applied to other widget types in the future.
2019-11-24GUI: Use the item at the click position in PopUpDialogBastien Bouclet
Fixes the having the drag in the dialog to change the selection on platforms with a touch screen.
2019-11-24GUI: Add DropdownButtonWidget and use it in the launcher for mass addBastien Bouclet
DropdownButtonWidget is a button split in two parts vertically. Clicking the left part triggers a default action. Clicking the right part shows a list of other actions the user can choose from. Using this widget on the launcher lets 'Mass add' be a secondary action of the 'Add' button, removing the necessity of pressing the shift key to access the feature.
2019-10-15GUI: Fix crash when clicking and dragging a tab widgetCameron Cawley
2019-10-03GUI: Add Missing Switch Default CasesD G Turner
These are flagged by GCC if -Wswitch-default is enabled.
2019-09-21BACKENDS: Add a default clipboard implementationCameron Cawley
2019-09-02GUI: Fix Missing Field Initializer in List WidgetD G Turner
This field was introduced by the TTS code changes, but only one of the constructors was modified to set the default value.
2019-09-01JANITORIAL: Remove some trailing whitespacesJaromir Wysoglad
2019-09-01TTS: Fix reading of list widgetsJaromir Wysoglad
The TTS read items from list widgets even when the mouse was outside the widget
2019-09-01TTS: Add age to TTSVoiceJaromir Wysoglad
2019-09-01TTS: Finish implementing the Windows TTS managerJaromir Wysoglad
2019-09-01TTS: Prepare for windows TTSJaromir Wysoglad
Add windows configuration in configure Add basic skeleton to backends Check if ttsMan is initialized in GUI
2019-09-01TTS: Add text to speech to the GUI.Jaromir Wysoglad
2019-08-03GUI: Fix TabWidget's < and > buttonsAlexander Tkachev
These were incorrectly positioned (typos in code, missing value in one expression).
2019-08-03GUI: Minor offsets fixes in Tooltip and EditTextWidgetAlexander Tkachev
2019-08-03GUI: Tune ScrollContainerWidget offsetsAlexander Tkachev
Well, it ain't a fix, because it's not exactly correct for any of the themes. Yet it's the best for all of them. If I put what seems to be correct, "modern" theme gets ruined, because it has this mystical 2px offset in tabs/scrollcontainers.
2019-08-03GUI: Fix scrollbarsAlexander Tkachev
- removed +1px in ListWidget, added in lordhoto's 2007 commit 68eb28a (aka r29971 in svn) `Fix for bug #1670082 "GUI: Modern theme gfx glitch in launcher".`, because it made clip this last line of scrollbar in all themes, which doesn't look good. In 2007 theme was written in .ini, which is not the case now. I don't see any glitches after removing this "fix"; - fixed how scrollbar top and bottom scroll buttons are drawn in ThemeEngine::drawScrollbar: there were these weird magic numbers, but in reality extra space that buttons should occupy is hardcoded in scrollbar.cpp (ScrollBarWidget) and is just +1px.
2019-07-30GUI: Rewrite Cloud tabAlexander Tkachev
- 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-02-16GUI: show/hide virtual keyboard when the EditTextWidget gains/loses the focusThierry Crozat
2018-11-14GUI: Add some override markersBastien Bouclet
2018-11-14GUI: Don't display the ScrollContainer background inside tabsBastien Bouclet
Fixes #10645.
2018-10-11GUI: Fix Mouse Wheel Input for Unknown Game Dialog.D G Turner
This should also fix this for other instances of ScrollContainer, though the dialogs / widgets may require the same change. This fixes bug Trac #10741.
2018-08-27GUI: Clean up file browser path entryBastien Bouclet
2018-08-22GUI: Add editable path in file browser dialogChatziargyriou Eleftheria
2018-07-24GUI: Handle continous scrolling in ScrollContainerThierry Crozat
When keeping the scrollbar up or down arrow pressed in a ScrollContainer is now scrolls continously, as it was already doing in the ListWidget.
2018-07-24GUI: Set ScrollContainer single step to kLineHeight instead of 1 pixelThierry Crozat
The single step is the amount of scroll done when clicking once on the scrollbar up or down arrow. It used to be 1 entry, but for the ScrollContainer 1 entry is 1 pixel, which was too litle. Now the single step can be set to a multiple entries.
2018-07-24GUI: Fix container widgets not receiving eventsThierry Crozat
2018-05-20JANITORIAL: Remove trailing whitespaceAdrian Frühwirth
2018-04-29GUI: Add copy to clipboard shortcut for EditableWidgetThierry Crozat
2018-04-19GUI: Unify clip and non-clip draw callsBastien Bouclet
2018-03-28GUI: Added override specifiersEugene Sandulenko
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