Commit Graph

3325 Commits

Author SHA1 Message Date
2396637d23 Implement file picker load/save normal 2025-03-07 08:43:09 -05:00
f9695887ec hidden controls don't handleClick() 2025-03-07 08:31:36 -05:00
da55e6f65d Function to get files in folder sorted by mtime 2025-03-07 08:31:36 -05:00
d29093fcd8 Make cStack page forward/backward a member function 2025-03-07 08:31:36 -05:00
6c1e831e8e DRY getting location string 2025-03-07 08:31:36 -05:00
dbb4cb3797 Save picker XML 2025-03-07 08:31:35 -05:00
cabec65cdf xml schema allow anchors in containers 2025-03-07 08:31:35 -05:00
206f5936cb Creating render textures is expensive - reuse the same one for all text size calculations.
This dramatically speeds up the unit tests that test every dialog.

Addresses #678 but not sure if this covers every possible case.
2025-03-07 00:59:23 -05:00
4ebb8e890c Make target-lock a feature flag 2025-03-06 21:35:48 -05:00
3e10e2923b Move camera to show the most possible targets in range 2025-03-06 21:35:48 -05:00
c9f79ba071 preferences add led for target-lock feature 2025-03-06 21:35:48 -05:00
9ca2f05c0b Don't display 'no item' response if another PC can shop. (#679)
These are the rules:

- If the active PC gets an empty shop, iterate from the first to last PC until finding someone who can see a shop item
    - If none can shop, show the 'no item' response
- When the active PC buys something, if this clears out the shop, iterate from the first to last PC until finding someone who can see a shop item
    - if none can see an item, stay on the empty shop of the PC that was active when the last item was bought.
- When shopping ends, if the shop interface was the last thing to change the player's active PC, it puts it back how it was.

Fix #669
2025-03-06 21:26:25 -05:00
14c36ed5a8 Debug action: crash the game 2025-03-06 21:24:07 -05:00
4cc6d7efb9 On catching fatal error, prompt to save the log and report 2025-03-06 21:24:07 -05:00
823fb8904d Set scale-aware text size when initializing the object 2025-03-06 21:23:57 -05:00
5696b97491 Fix Scenario Details 2025-03-06 20:17:23 -05:00
7dd2dd9d2e add confirmed credits names 2025-03-06 19:43:10 -05:00
Nathan R
598fd4836a Fixed up: Move file-static RenderWindow and RenderTexture instances inside functions to fix GL race condition on startup (#682) 2025-03-06 19:40:40 -05:00
cf736d1835 animate fake damage only allow static booms 2025-03-05 19:27:10 -05:00
434577426e Make -2 the magic infinite loops value 2025-03-05 19:27:10 -05:00
bb3937d40a New feature: dialogs with pictures can animate 2025-03-05 19:27:10 -05:00
0db2dc056d Add labels for animation spec node fields 2025-03-05 19:27:10 -05:00
7ceeb51c50 allow choosing animated booms in pict dlg 2025-03-05 19:27:10 -05:00
9b4af4e69c Let individual dialogs toggle pict animations 2025-03-05 19:27:10 -05:00
d93facc056 cPict support a limited number of animation loops 2025-03-05 19:27:10 -05:00
c32a6662cb delete TODO 2025-03-05 19:25:07 -05:00
df215d32f4 Clarify why the comment is there 2025-03-05 19:25:07 -05:00
f091d464d4 Add out-of-bounds check to get_sdf_name() 2025-03-05 19:25:07 -05:00
a6d5e29444 Add TOC element for SDFs. Fix #675 2025-03-05 19:25:07 -05:00
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