Commit Graph

28 Commits

Author SHA1 Message Date
8b08b46ea0 Unbake the special help texts.
The text in the various help dialogs that was previously baked into an image is now drawn as text, meaning that it benefits from text unblurring when scaling is active.

This entails some small changes to layout, since it's a different font.

Dialog engine changes:
* A new picture type allowing to draw the inventory button icons directly into a dialog.
* A new widget type that simply draws a line between two points.
2025-03-16 14:03:53 -04:00
16703ae7a2 Don't implicitly call recalcRect() 2025-03-16 14:03:53 -04:00
3d48cb14e7 Add an SDF picker for selecting a stuff done flag and optionally giving it a name.
In effect, this is a combination of two of the previous pickers:
the location picker, and the editable string picker.

This required quite a significant rework of how the tilemap places its children.

Currently it's only used in special node editing.
I plan to add its use in many other places too though.
2025-03-02 19:13:01 -05:00
413b274b61 Parse name and bounding box attributes in parseAttribute instead of directly in parse 2025-03-02 19:13:01 -05:00
9b05c23d15 Rework parentage and naming of dialog controls.
All controls now store a reference to their direct parent,
whether it be the dialog itself or a container control.

Every dialog control now has a guaranteed parent, which abstracts away
the three possible types of parents (dialog, container, and plain window).

The control name is now stored in the control from the moment it is parsed from the XML.
This means that it's set before the parseContent function, though after parseAttribute.
2025-03-02 19:13:01 -05:00
f018f051f6 Add a new tilemap control that replicates its children into a fixed grid.
Use it for the Edit Terrain Object dialog.
2025-03-02 19:13:01 -05:00
a01c9d6e2a All controls store their name/keyO 2025-02-27 08:55:26 -05:00
f5f157c2ea Make cContainers handle relative elements within 2025-02-27 08:55:26 -05:00
c94228c99c Default controls keep their hotkey AND the enter key 2025-02-19 19:29:02 -06:00
888b86404c move forward declaration 2024-11-19 18:54:06 -06:00
cd6c0a0a30 link controls auto-add click handler 2024-11-19 15:06:43 -06:00
d5a536c19c encapsulate control.lbl so setText() is required 2024-08-22 09:47:06 -04:00
39c85e7f3c limit framerate of controls' nested event loops 2024-08-22 09:47:06 -04:00
b624b32284 Seeing \a is just confusing, so make it a constant 2024-08-12 19:27:30 -04:00
f2b7372b15 make click sound handling DRY 2024-07-03 18:42:20 -06:00
2adbafd3dc Add missing getter cControl::getLabelCtrl 2023-01-22 17:58:29 -05:00
d3283e466d Add optional label to cControl::setTextToNum 2023-01-22 17:57:07 -05:00
455af36c81 const-correctness in dialogxml (widgets) 2023-01-22 17:04:32 -05:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
f14c99f14b Split out cContainer, cLed, and cLedGroup into their own files 2020-12-21 17:16:15 -05:00
f0f789913f parseChildControl now returns the control's ID if successful 2020-02-24 00:13:37 -05:00
8f81a3504d Deduplicate child element parsing in DialogXML 2020-02-24 00:07:45 -05:00
c65bac2a8f Implement relative positioning system for DialogXML
This allows widgets to be positioned relative to other widgets.

Two dialogs have been converted to use relative positioning.

Also fix some issues with calculating the dialog rect.
2020-02-23 22:00:01 -05:00
9f60f7e378 Implement <key> tag in DialogXML which substitutes a buttons key shortcut into its label 2020-02-21 22:25:48 -05:00
12bde373b1 Refactor dialog parsing to reduce code duplication
- Refactor dialog format parameter management to use a single protected control function
- Format parameters "frame" and "frame style" merged
- Colour is now a first-class format parameter (though it still has a separate setter)
2020-02-20 23:41:40 -05:00
e7a264bb90 Remove non-empty exception specifications, which have been deprecated for nearly ten years now 2020-02-10 22:36:36 -05:00
Michael Bonfils
d940f2c39d Merge branch 'linux' into merge_linux 2018-02-08 20:36:46 +01:00
82abdab695 Major code reorganization
This commit only updates the XCode project for the changes.
A later commit each will update it for scons and MSVC.

A few actual changes are mixed in:
- Add a prefix header for a handful of common definitions
- Moved current_cursor into the Cursor class as a static member
- Removed the make_cursor_sword and make_cursor_watch functions
- Include tests in the All target
- Remove redundant -l flags for Common and Common-Party (since they're included in the Link phases anyway)
2017-04-14 00:24:29 -04:00