Commit Graph

153 Commits

Author SHA1 Message Date
Eugene Sandulenko 0ddccddfee GUI: Fix regression with layout computation 2024-11-16 12:46:13 +01:00
Eugene Sandulenko 4e97ec7484 GUI: Allow variable references in STX value lists 2024-11-15 23:41:43 +01:00
Cameron Cawley 96f9569790 GUI: Make use of simple blitting routines where possible 2024-06-19 02:36:17 +02:00
su-xingyu c577b1d616 GUI: Fix hard shadow under HiDPI rendering (#4908) 2023-04-15 02:04:16 +02:00
Cameron Cawley 48ed15011c GUI: Allow comparing the width with the height in resolution checks 2023-03-20 00:18:25 +01:00
Cameron Cawley 6c5c6f8140 GUI: Add a resolution property for layouts 2023-03-20 00:18:25 +01:00
Eugene Sandulenko db1fbfee21 GUI: Fix compilation 2023-03-16 14:24:19 +01:00
Eugene Sandulenko 6ee47a9ba6 GUI: Report threshold height different for IPHONE
It is hacky at the moment, being hardcoded, but I had a dilemma between
hardcoding it for a special case, or introducing yet-another OSystem
API call that will be used only by single platform.

Also, I am struggling with coming up for a proper name for this API.
2023-03-16 14:13:02 +01:00
Eugene Sandulenko 359753112d GUI: Add ability to check layout resolution against constants 2023-03-16 14:05:29 +01:00
Eugene Sandulenko 866990153c GUI: Support >= and <= in resolution filter 2023-03-16 13:43:32 +01:00
Eugene Sandulenko 030ff7ca96 JANITORIAL: Remove trailing whitespaces 2023-03-16 13:43:11 +01:00
grisenti c0acb85605 ALL: add support for --savepath command 2022-05-29 13:56:21 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 6ba2fb9f3b GUI: Fixed crash in 640x400 theme. Bumped theme version.
This is made by allowing widgets to be skipped for certain resolutions.
In this particlar case, the new layour switcher buttons were not
fitting by height on 640x400 theme, so we now reduce spacing
between the action buttons.
2021-11-21 20:00:08 +01:00
Eugene Sandulenko 5665790bae GUI: Avoid double scaling for Dialog insets 2021-04-17 20:09:08 +02:00
Eugene Sandulenko 2839715a45 GUI: Remove TransparentSurface remnants aka alphabitmaps from themes 2021-04-11 21:21:44 +02:00
Eugene Sandulenko af17cb30f4 GUI: Remove duplicate methods 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 3021f34060 GUI: Add support for specified dimensions for bitmaps in theme file
When we are using SVG, there is no reliable way to get the proper
dimensions. The original code was relying on the dimensions of
the BMP file, and then was using those for understanding the
rendering positions e.g. for PicButtons.
2021-04-11 21:21:44 +02:00
Eugene Sandulenko 55ae2e4367 GUI: Added SVG support to theme parser 2021-04-11 21:21:44 +02:00
Eugene Sandulenko a6afdd701a GUI: Fix scaling for clip values in theme
Fixes DropDownButton
2021-04-11 21:21:44 +02:00
Eugene Sandulenko a5f6866d49 GUI: Scale spacing in themes 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 9e746e04f2 GUI: Always scale padding 2021-04-11 21:21:44 +02:00
Eugene Sandulenko db88f4db05 GUI: Avoid double scaling of referenced variables 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 982e500660 GUI: Added 'scalable' parameter to theme variables 2021-04-11 21:21:44 +02:00
Eugene Sandulenko b29f457548 GUI: Scale theme on loading 2021-04-11 21:21:44 +02:00
Eugene Sandulenko a0d4162a2b GUI: Compute base scale factor and set it for ThemeParser 2021-04-11 21:21:44 +02:00
Eugene Sandulenko ba2013cb46 GUI: Properly parse the 'rtl' key's value in the themes 2021-03-25 23:14:10 +01:00
Eugene Sandulenko b855b690e5 GUI: Fix memory overrun 2020-11-03 23:47:23 +01:00
athrxx 5b6ffeaa3d GUI: allow ingame CJK dialogs regardless of the launcher language
This allows a text widget to be expressly marked as Japanese, Korean or Chinese, so that the theme engine may use an appropriate font.
2020-10-30 21:36:23 +01:00
Eugene Sandulenko fc075e29da GUI: Added sanity check to <font> key parser 2020-09-17 02:30:20 +02:00
Eugene Sandulenko 65e38680dd GUI: Added XML theme setting for overriding the fonts depending on the selected language.
- Added Japanese, Korean and Traditional Chinese fonts to fonts.dat
- Bumped fonts.dat file version to 1.4
- Bumped theme version to 0.8.39
- Regenerated built-in theme
2020-09-17 02:00:33 +02:00
aryanrawlani28 51d95f8978 GRAPHICS: move start + end to Graphics::TextAlign 2020-06-22 00:03:02 +02:00
BLooperZ 4fc9c11bbe GUI: use start + end for static widgets 2020-06-22 00:03:02 +02:00
BLooperZ e6e32aeb75 GUI: use start + end for horizontal align 2020-06-22 00:03:02 +02:00
aryanrawlani28 07ab77d065 GUI: RTL: Get internal widget RTL flag from theme 2020-06-22 00:03:02 +02:00
aryanrawlani28 08f5efd23e GUI: RTL: Add rtl flag and helper function to widget 2020-06-22 00:03:02 +02:00
Bastien Bouclet 8ae288c52f GUI: Allow defining layouts programmatically with a chaining syntax 2020-03-28 07:38:39 +01:00
Bastien Bouclet 94344ccf8e GUI: Allow providing an explicit size for screen_center dialogs
Without an explicit size the layout system does not have enough
constraints to produce nice looking dialogs. Up until now the workaround
was to set explicit an size for some of the widget. This worked well
enough except when resizing down the window up until the widget size
constraints could no longer be enforced. At that point, produced layouts
looked too squished.
2020-02-22 13:14:04 +02:00
Bastien Bouclet 6e1abf064a GUI: Use nullptr instead of 0 or NULL where appropriate 2020-01-19 15:08:37 +01:00
Bastien Bouclet 346d53b034 GUI: Add finer control over cross-direction alignment for layout items
Previously it was only possible to specify whether items where aligned
to the start or centered in the cross direction of the layouts. It is
now additionally possible to align the items to the far end of the cross
direction or to resize them to match the size of the layout.

Terminology and behavior are loosely based on CSS's flexbox containers.
2020-01-04 10:56:25 +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
D G Turner d78459f8bc GUI: Fix GCC Compiler Warnings in GUI Theme Parser Code
This removes the usage of memset to clear complex structures and replaces
them with constructor methods for the structures which will be executed
when these are instantiated.
2019-08-17 05:03:04 +01:00
Bastien Bouclet a5d93d933a GUI: Use a truetype font for the debug console 2019-05-05 08:52:12 +02:00
Colin Snover 51329c0dc6 ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
Eugene Sandulenko 94bc75ae46 GUI: Implemented centering of dialog background 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 38114eb760 GUI: Plug NinePatch bitmaps into parser 2016-08-24 16:07:55 +06:00
Eugene Sandulenko ec7312ac13 GUI: Implemented more modes to autoscale 2016-08-24 16:07:55 +06:00
Eugene Sandulenko 4474ccf814 GUI: Implemented alphabitmap autoscale 2016-08-24 16:07:55 +06:00