39 Commits

Author SHA1 Message Date
Eugene Sandulenko
6aacdb1938 GUI: Normalize width/height parameters
The fact that ThemeLayout had them int, and GuiObject as uint, was
leading to number of unexpected overflows.
2020-05-09 21:59:07 +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
Alexander Tkachev
cea58cc61c JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
Alexander Tkachev
0ae4409138 GUI: Add ThemeLayoutTabWidget 2016-07-03 12:20:03 +02: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
Johannes Schickel
38b2b3c04f Move StringTokenizer to its own files (tokenizer.h/tokenizer.cpp).
svn-id: r48310
2010-03-20 12:56:56 +00:00
Eugene Sandulenko
b0db1b5ed0 Implement FR#2507667: "GUI: Improve PopupWidget rendering / theme layouting".
- Split out label from PopUp widget
- Aligned every widget on all layouts so GUI becomes to look nice again
- Moved textHAlign to layout properties

svn-id: r41266
2009-06-06 17:52:44 +00:00
Eugene Sandulenko
b0f7f2e8d4 Implement widget property "textalign". Added it to all theme layouts
svn-id: r41265
2009-06-06 17:51:41 +00:00
Max Horn
69f4b7a383 Got rid of ThemeLayout::getDialogData; added some comments, asserts; moved getParentW & getParentH to class ThemeLayoutStacked
svn-id: r35571
2008-12-27 14:30:30 +00:00
Max Horn
131cb5a05a Merged ThemeLayoutHorizontal and ThemeLayoutVertical into a new class ThemeLayoutStacked (suggestions for a better name are welcome); stored padding data in a Common::Rect
svn-id: r35548
2008-12-26 01:08:49 +00:00
Jordi Vilalta Prat
b1999a2a16 Fixed indentation and removed whitespaces at the end of line
svn-id: r35481
2008-12-22 11:22:15 +00:00
Max Horn
144be21bed GUI: Got rid of the WidgetSize stuff
svn-id: r35022
2008-11-12 13:14:44 +00:00
Max Horn
fa942c42cc GUI: Got rid of most 'built-in' variables
svn-id: r35018
2008-11-12 12:53:53 +00:00
Max Horn
f5b70114ca Removed many unnecessary #includes
svn-id: r34959
2008-11-09 15:14:01 +00:00
Max Horn
0508fec8a8 Pushing down some header deps
svn-id: r34936
2008-11-08 01:30:32 +00:00
Vicent Marti
820a45d851 Fixed: Parser crash when adding an XML layout with an unhandled type.
svn-id: r34801
2008-10-14 17:29:48 +00:00
Max Horn
4a56e0d9c1 Merged ThemeEngine::themeEval() and ThemeEngine::evaluator() methods into a single getEvaluator() method
svn-id: r34789
2008-10-12 22:25:35 +00:00
Vicent Marti
dcc72fe29e Massive refactoring/cleanup on the theme engine/parser.
svn-id: r34285
2008-09-02 17:51:08 +00:00
Vicent Marti
9aaf83df03 Added support for automatically resizing more than one widget in a flowing layout. Classic theme launcher now looks ok in g3x.
svn-id: r33906
2008-08-15 17:40:58 +00:00
Vicent Marti
784c1114cc Deprecated support for "direction" layout keys.
svn-id: r33904
2008-08-15 16:44:44 +00:00
Vicent Marti
8eaa982c41 Added Classic Theme - WIP (yes, it's working).
Added Builtin theme back.
Added Python script to automatically build themes.

svn-id: r33868
2008-08-14 18:43:27 +00:00
Vicent Marti
0bf2187039 Finished GUI layout in g1x.
svn-id: r33818
2008-08-13 10:42:01 +00:00
Vicent Marti
559c19e9f4 Bugfix: Inverse layout reflowing.
Bugfix: Glitches with several layouts when using Aspect Ratio Correction.

svn-id: r33764
2008-08-10 18:26:14 +00:00
Vicent Marti
ea69217a13 Fixed 1.000.000 Valgrind warnings.
svn-id: r33711
2008-08-09 14:15:34 +00:00
Vicent Marti
dab1fa0942 Resolution-dependence in XML files.
G1X scaler GUI now loads. Added layout for the launcher menu.
MILESTONE: All core GUI dialogs/widgets working on G2x/G3x
MILESTONE: Completely removed old Evaluator/Parser.
Improved layout expanding again.
Improved XML parser.
Several bugfixes.

svn-id: r33704
2008-08-08 18:30:16 +00:00
Vicent Marti
3ca6f76f7b Browser dialog.
Improved layout expansion in the layout parser.
Fixed serious coordinates initialization bug.

svn-id: r33702
2008-08-08 15:06:28 +00:00
Vicent Marti
1ea3301a8a SCUMM save/load dialog.
Expanded documentation.
Added support for sub-blitting in the vector renderer.

svn-id: r33697
2008-08-08 10:37:58 +00:00
Vicent Marti
39c28e434b SCUMM general and options dialog.
Misc fixes.

svn-id: r33692
2008-08-07 23:23:21 +00:00
Vicent Marti
21989844a9 Game Options menu parsing.
Added support for importing layouts inside other layouts.
Misc bugfixes.

svn-id: r33676
2008-08-07 10:53:33 +00:00
Vicent Marti
bd0cdd0f74 Cleanup on default theme.
Added support for Widget Type Declaration (makes XML much cleaner).

svn-id: r33661
2008-08-06 14:28:37 +00:00
Vicent Marti
ef7a14dbe2 Options menu fully parsed. Needs tweaking.
svn-id: r33657
2008-08-06 10:50:28 +00:00
Vicent Marti
4256c35791 Options menu layout parsing, featuring the brand new FATPOPUPS.
svn-id: r33651
2008-08-05 23:58:45 +00:00
Vicent Marti
eb3d163439 Look, the launcher is rendered with the new layout parser.
svn-id: r33641
2008-08-05 16:23:17 +00:00
Vicent Marti
fdf485ea9b Missing file in last commit.
svn-id: r33631
2008-08-05 10:03:53 +00:00