155 Commits

Author SHA1 Message Date
aryanrawlani28
08f5efd23e GUI: RTL: Add rtl flag and helper function to widget 2020-06-22 00:03:02 +02:00
Bastien Bouclet
f7efd3cd7f GUI: Fix error when renaming a target in the edit game dialog
The OptionsContainerWidget keeps a copy of the name of the game domain
that needs to be updated when the target is renamed.

Ideally, OptionsContainerWidget would simply keep a pointer to the
ConfigurationManager::Domain object, however that's not currently
possible as the ConfigurationManager defaults are global instead of
being per domain. As a result they are not accessible from the Domain
object.

Fixes #11416.
2020-04-11 08:16:21 +02:00
Bastien Bouclet
c8f2d8a1d3 GUI: Introduce OptionsContainerWidget, a container for settings widgets
OptionsContainerWidget is a GUI widgets container that is meant to be
used for configuration dialogs tabs. It provides an interface subclasses
can implement for loading and saving settings from a configuration domain.
2020-03-28 07:38:39 +01:00
Bastien Bouclet
8ae288c52f GUI: Allow defining layouts programmatically with a chaining syntax 2020-03-28 07:38:39 +01:00
Bastien Bouclet
6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet
c566d02992 GUI: Add override markers where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet
c0d8b6d9fc GUI: Introduce dynamic layouts
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.
2020-01-04 10:56:25 +01:00
Bastien Bouclet
2c812a6b7a GUI: Add DropdownButtonWidget and use it in the launcher for mass add
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-11-24 14:06:25 +01:00
Jaromir Wysoglad
b5cebcbeae TTS: Add text to speech to the GUI. 2019-09-01 22:47:55 +03:00
Jaromir Wysoglad
39e74b027e TTS: Add part of linux TTS 2019-09-01 22:47:55 +03:00
Bastien Bouclet
4d29ce21d0 GUI: Unify clip and non-clip draw calls 2018-04-19 19:18:39 +02:00
Bastien Bouclet
dcfac42bb3 GUI: Remove alpha bitmap support
It was never used since its introduction 4 years ago
It was not updated to work with the clipping rect
2018-04-19 19:13:12 +02:00
Bastien Bouclet
0496ede62f GUI: Implement dirty-checking for widget redraws 2018-01-27 18:12:34 +01:00
Thierry Crozat
91125bcbcd GUI: Add method to know if a widget contains a given widget 2017-04-06 21:55:28 +01:00
Eugene Sandulenko
30f7556bee GUI: Added support for alphabitmaps in picbuttons 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
75f9b099dc GUI: Added possibility to specify scale mode for AlphaBitmaps 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
f0c52096f3 GUI: Implemented possibility to use alphabitmaps in GraphicsWidget 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
762671ccd8 GUI: Added possibility to specify several state images for PicButtonWidget 2016-08-24 16:07:55 +06:00
Eugene Sandulenko
2a9cf65eeb GUI: Add mode to skip drawing of button for PicButton 2016-08-24 16:07:55 +06:00
Alexander Tkachev
846619fd42 GUI: Add checks in Widget::getBossClipRect()
Prints a warning if clipping area is invalid and fixes it.
2016-07-03 12:24:56 +02:00
Alexander Tkachev
fca0f0ed34 GUI: Make PopUpWidget clip 2016-07-03 12:16:43 +02:00
Alexander Tkachev
49caaf77a1 GUI: Add ScrollContainer 2016-07-03 12:10:56 +02:00
Ori Avtalion
e30a94e6ff GUI: Remove 'sticky button' feature
This feature made pressed buttons wait a few moments before returning to
an unpressed state. It was half-implemented, and caused several visual
bugs. Fixes #7083.
2016-04-14 18:37:12 +03:00
Eugene Sandulenko
3c4ccfc52c GUI: Enhanced StaticTextWidget with font style 2016-03-30 11:09:32 +02:00
Ori Avtalion
031e062252 GUI: Improve handling of button presses while moving the cursor
Keep track of where a mouse press started when deciding how mouse-over
and mouse-up should behave.

This handles the following situations:

1) If a mouse press starts outside a button (e.g. the UI background),
mouse-up inside the button has no effect. Previously, it triggered a
button click.
2) If a mouse press starts inside a button, the cursor moves outside of
its region, then back inside, the button will show as pressed.
Previously, it showed as highlighted instead of pressed.
2016-03-27 23:29:37 +03:00
Johannes Schickel
f5dfe6725a GUI: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Johannes Schickel
a1e56adad8 GUI: Use in-place Surface conversion in widget code. 2012-08-28 02:28:17 +02:00
Johannes Schickel
0cf00ddfe2 GUI: Make container widget a bit more container like.
Now it is possible to add sub widgets to a ContainerWidget and allow for these
to get events too.
2012-07-09 02:18:22 +02:00
Johannes Schickel
c1426f783d GUI: Use a black rect when no thumbnail is available in the thumbnail load chooser. 2012-06-29 16:16:28 +02:00
Johannes Schickel
80ae9d7d34 GUI: Allow tooltips to be changed after widget creation. 2012-06-20 03:31:50 +02:00
Johannes Schickel
cebbc11dac GUI: Allow Surfaces with abitrary RGB pixel formats to be used in PicButtonWidget and GraphicsWidget.
Only 1Bpp aka paletted surfaces are not supported.
2012-06-13 04:48:34 +02:00
Oleksiy Kurochko
e6c317a922 GUI: Implemented pressed state for buttons 2012-05-03 19:32:08 +03:00
Tarek Soliman
be0f8407b6 GUI: Handle adding clear buttons that don't exist in layouts
The buttons in the keymapper are dynamically generated and don't exist in
the layout; They have no name.
2011-12-13 08:37:18 -06:00
Tarek Soliman
c6e001a1f5 GUI: Move addClearButton() from options.cpp to widget.cpp
This is so it can be used outside options.cpp
2011-12-13 08:36:41 -06:00
Eugene Sandulenko
b0fe2bbaf9 GUI: Made PicButtonWidget derivative of ButtonWidget 2011-10-25 14:56:04 +01:00
Eugene Sandulenko
9e0c1a38e1 GUI: Consistent behavior of ButtonWidget::setLabel() 2011-08-06 11:30:58 +01: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
David Turner
6412b1d2c7 GUI: Fix Memory Leak from PicButtonWidget _gfx Member.
This widget is only currently used by Hugo.

svn-id: r55364
2011-01-20 22:32:30 +00:00
Eugene Sandulenko
04a9082d02 GUI: Implement PicButtonWidget
It is a button with picture intead of text. To be used by Hugo engine

svn-id: r55099
2011-01-03 12:23:50 +00:00
Eugene Sandulenko
d6695e180c GUI: Fix tooltip drawing
With help of Tanoku tooltips were switched from widgets to dialogs
which helped to fix nasty bug with background not being restored.
Although it is basically a hack around inconsistent font backbuffering
in our GUI code, for the time being it is feasible.

The patch was extended with way to specify tooltip background in the
theme file.

svn-id: r51217
2010-07-23 19:36:47 +00:00
Johannes Schickel
e5e94d4511 Strip trailing whitespaces in our common code base.
svn-id: r51094
2010-07-21 18:17:51 +00:00
Eugene Sandulenko
01f9006ee7 GUI: Implement tooltips. FR #2821513.
FR #2821513: "GUI: add tooltips".
Added tooltips for Add Game button, clear field buttons and couple
other.

Current problem: Only first call correctly restores text. I could
not find where restore information gets lost.

svn-id: r49774
2010-06-15 10:52:35 +00:00
Eugene Sandulenko
dc040aa867 GUI: Implement radiobuttons.
Implement radiobuttons in GUI. Also closes FR #2821529:
"GUI: volume and subtitles speed sliders".

Subtitle toggle button is replaced by three radiobuttons grouped
by a single group.

Updated translations and themes.

svn-id: r49767
2010-06-15 10:48:39 +00:00
Eugene Sandulenko
3fafa07ab0 GUI: Added in-place hotkeys for widgets.
Now it is possible to specify hotkeys in place for ButtonWidget
and CheckboxWidget (the only widgets with hotkeys now).

Use de-facto standard with putting hotkey between tildes (~).
Like '~O~pen'. The tildes gets stripped before after hotkey
is extracted.

This is done for giving translators possibility to specify
their own hotkeys.

Old hotkeys defined at widget instance creation are left for
leaving possibility to specify non-printable hotkeys such as
Common::ASCII_ESCAPE.

Translation files were updated respectively.

svn-id: r49766
2010-06-15 10:47:31 +00:00
Max Horn
6e78fdc161 cleanup
svn-id: r48240
2010-03-11 23:40:40 +00:00
Johannes Schickel
b3c6751b9b Strip trailing whitespaces in the whole code base.
svn-id: r40867
2009-05-24 15:17:42 +00:00
Johannes Schickel
e7bf64744b Got rid of GuiManager::clearDragWidget instead handle it via a new widget flag WIDGET_IGNORE_DRAG.
svn-id: r35662
2009-01-02 01:31:46 +00:00
Max Horn
f26f85ee96 GUI: Added Widget::setVisible convenience wrapper
svn-id: r35572
2008-12-27 14:36:28 +00:00
Jordi Vilalta Prat
bce76931d3 Added valueToBarWidth to calculate SliderWidget's bar width like it was done before (as discussed with LordHoto)
svn-id: r35519
2008-12-24 01:11:58 +00:00