Commit Graph

3046 Commits

Author SHA1 Message Date
7cd2863f95 update SDF documentation for new semantics 2025-03-05 19:25:07 -05:00
90d5e1b778 use nested map for SDF names to save stack space.
Update semantics of the SDF array to (row, column) form to match
the picker space

Fix #674
2025-03-05 19:25:07 -05: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
4118c8acd7 Fix findControl() not recursing into children of children 2025-03-02 19:13:01 -05:00
35b2ca4e3f Crash early before trying to create a window many times larger than the screen
Note: This could make certain larger dialogs always crash with a high enough pixel scale. Needs testing.
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
5861268e8c Add a location picker for selecting a location in a town or outdoor sector.
It's currently used in special node editing and in advanced town details.
2025-03-02 19:13:01 -05:00
63bbb38374 Fix an infinite loop when using a container as an anchor for another widget 2025-03-02 19:13:01 -05:00
e1a03ce881 Add a 'filled' option to dialogxml pict and use it in get-items
Fix #629
2025-03-02 19:13:01 -05:00
e9174de1ae Fix stacks not drawing a frame even if requested 2025-03-02 19:13:01 -05:00
3af30a88a8 Fix a confused error message 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
2ee2a545ef BoEB: Make more items stack
These are all cases where similar items stack but these ones for some reason didn't.

Gemstones/Ores: Ruby, Crystal, Rough Diamond
Powders: Dust of Hiding and Choking
Missiles: Poison Darts; Arrows of Life and Light; Burning and Exploding Arrows
Reagents: Asp Fangs
2025-03-02 19:13:01 -05:00
4ac049340a BoEB: Add item type flag strings 2025-03-02 19:13:01 -05:00
1ad973c59e Use the editable string picker for item type flags in the item editor. 2025-03-02 19:13:01 -05:00
0ccdd38cb1 Implement a picker for selecting an item class, using the editable string picker.
Used in special node editing and also item editing.
2025-03-02 19:13:01 -05:00
62267261f3 Implement a picker for major events, using the new editable string picker.
It's used not only in special node editing (for Event Happens and If Event Happened?)
but also in the Townperson Advanced, Talk Node, and Quest editors.
2025-03-02 19:13:01 -05:00
97cba0471b Add an editable version of the string picker, which allows you to edit each of the strings inline and even add new ones.
This just implements the guts of the dialog, without using it for anything yet.

It also fixes a bug that caused a blank page to appear in the string picker if the total number of strings was an exact multiple of 40.

Closes #563
2025-03-02 19:13:01 -05:00
58890f1b57 Templatize cStringChoice iterator constructor 2025-03-02 19:13:01 -05:00
719f7dcf47 Reformat cStringChoice constructors 2025-03-02 19:13:01 -05:00
36dc44ad1c Implement a picker to select a boat or horse when editing a special node 2025-03-02 19:13:01 -05:00
8ab663b620 Add a user-defined name to vehicle definitions.
This also adds partial support for a custom vehicle graphic.
2025-03-02 19:13:01 -05:00
f4bdf95617 Convert the edit vehicle dialog to relative positioning 2025-03-02 19:13:01 -05:00
3a354752e6 Implement a picker to select a sector in Relocate Outdoors 2025-03-02 19:13:01 -05:00
2b93d739e8 Implement a mechanism for a special node picker to affect two fields
Use it for the MSG_PAIR picker and the PIC_NONE picker.
2025-03-02 19:13:01 -05:00
1d119e1f26 Implement a toggle picker for special node fields 2025-03-02 19:13:01 -05:00
8ac6caa8c5 Implement the new string types 2025-03-02 19:13:01 -05:00
7306c65d5a Sketch out what pickers and string lists should probably exist, and annotate those into the button dictionary.
This commit doesn't implement any new pickers, only adds the data for later use.
2025-03-02 19:13:01 -05:00
be702fe365 Fix some missing annotations in the button dictionary.
These are mostly errors that were already wrong in the old dictionary.
It's possible that some are things missed in the refactor though.
2025-03-02 19:13:01 -05:00
4174ccd470 Rework the special node button dictionary (#607) 2025-03-02 19:13:01 -05:00
56bbdbc6f8 Implement the inline special node help button
Though this creates the framework, the actual help strings have not been filled in yet.
2025-03-02 19:13:01 -05:00
89dbe98b2b Refactor special node properties struct to isolate the magic characters.
Basically what that means is that the magic characters are only parsed at startup – the scenario editor code doesn't need to understand them, instead using an enum.

This is part of the work for #607
2025-03-02 19:13:01 -05:00
0465923992 Fix some images that became ridiculously large due to unnecessary metadata 2025-03-02 01:33:01 -05:00
7cd48a44ee remove -> void where unnecessary 2025-03-02 01:15:53 -05:00
03b9bf5abf Confirm before debug-switching scenario 2025-03-02 01:15:53 -05:00
92f698cc57 Debug actions to quick-launch core scenarios 2025-03-02 01:15:53 -05:00
1d63e76c26 More buttons for debug help window 2025-03-02 01:15:53 -05:00
b4af09c548 Fix debug help menu crash 2025-03-02 01:15:53 -05:00
94b5bcae53 throw catchable error from unsupported charToKey 2025-03-02 01:15:53 -05:00
068e87ea39 Debug enter town: Move outdoor location. Fix #664 2025-03-02 01:15:53 -05:00
a7ba60a6d5 Allow limited debug mode in startup menu 2025-03-02 01:15:53 -05:00
f464526d0d preview_dialog_xml don't try to load empty filename 2025-03-02 01:15:53 -05:00
aa36b6cefb previewing dialogs, don't crash the game 2025-03-02 01:15:53 -05:00
ad43e8ab81 Draw item scrollbar in boom_space. Fix #650 2025-03-02 01:13:53 -05:00
8973618dff Wait action: always print to buffer when can't 2025-03-02 01:13:30 -05:00
91f28d3c9d Fix menubar alchemy clicking 'Ask About' in talk mode 2025-03-02 01:13:30 -05:00
9dfc9e7287 DRY a frequently used buffer string 2025-03-02 01:13:30 -05:00
0afed5db59 A feature flag denotes whether a scenario uses the new or old format for its metadata. With the old format (legacy scenarios and openBoE scenarios created prior to this PR) everything displays in the scenario picker as before, and scenario designers get 2 text fields to display however they want, and 2 text fields that are pretty much useless.
With the new format, Author and Contact info are formatted onto the first line in the scenario picker display. The scenario designer gets 1 line to write a teaser.

Fix #593

Also fix a bug where scenario ratings were appearing as integers ingame instead of the correct "G", "PG", etc.
2025-03-02 01:09:03 -05:00
0f4b1124f6 reorder make-scenario1 2025-03-02 01:03:21 -05:00