Commit Graph

86 Commits

Author SHA1 Message Date
ae40151726 Update scenario.xml schema 2025-05-11 10:51:08 -05:00
c407ffd248 allow ELLIPSIS mode through dialogxml 2025-05-11 10:50:08 -05:00
8af5eb6c38 dialogs can have a button respond to Escape
I'm planning to make it so the Enter key will never cancel a yes/no dialog. To do this, I'm adding an Escape button to dialogs. So cancel/accept keyboard shortcuts will be predictable and intuitive. Dialogs that require extra confirmation will have a 'really confirm' LED.
2025-03-30 11:51:11 -05:00
ab952db0cd note in dialog.xsd for doc file I can't ever find 2025-03-30 11:51:10 -05:00
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
4c4c70648c Add a fill-color attribute to <pict> 2025-03-08 20:05:12 -05:00
50637d3ddd Use an editable string picker for job boards when editing quests or dialogue nodes 2025-03-08 20:05:12 -05:00
a1bc923de8 Remove the Edit Saved Item Rectangles menu item in favour of a toolbar button.
The limit of 3 saved item rectangles has been removed - you can now add as many as you want.
However, the 1 per town limit is now strictly enforced.

The saved item rectangle is now shown with a cyan border when editing town.
2025-03-08 20:05:12 -05:00
cabec65cdf xml schema allow anchors in containers 2025-03-07 08:31:35 -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
e1a03ce881 Add a 'filled' option to dialogxml pict and use it in get-items
Fix #629
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
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
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
f80f8a932a Implement a feature flags system.
* Scenarios contain a string map of feature flags. The flag names are the keys, and flag versions are the values, so a typical value might be "fixed" for bug fixes or for evolving features, "V1", "V2", etc.
* The game has a map of flags to lists of supported versions. The game can therefore signal that it supports a legacy behavior for a given feature flag. The last version in the list is considered to be this build version's default behavior.
* When launching a scenario, we check to make sure the game supports the scenario's required versions of its feature flags.
* When launching a replay, we make sure the game supports the feature flags that the version of the game that made the recording did.

Fix #555
Close #591
2025-02-19 22:32:12 -05:00
a669fe0223 handle showPipes in code only. Fix #609 2025-02-18 09:37:29 -05:00
2145d88133 Remove the <os> element from scenarios
Fix #522
2025-02-16 21:41:47 -05:00
920fa0d27b fix syntax in scenario.xsd 2025-02-16 10:11:30 -05:00
fcf0bcc324 add show-pipes attribute to <text> 2025-02-09 20:37:46 -06:00
c079d0f5a9 Allow int value for text size in dialogxml 2025-02-09 11:16:24 -06:00
de45b379e3 add max-chars attribute to text field 2025-01-23 20:12:32 -06:00
270b2bb802 fix last case of textSide 2024-12-03 09:44:40 -05:00
3bd9154412 rename new led attribute 'label-pos' 2024-12-03 09:44:40 -05:00
c35ba7cc62 LEDs allow text on the left side 2024-12-03 09:44:40 -05:00
2b01a18bb3 make text-size an optional attribute of button 2024-12-03 09:44:40 -05:00
7a1297b2c8 specify align attribute type as enum 2024-11-23 17:06:15 -06:00
af2253e5ce reconfigure about-boe.xml with right alignment convention 2024-11-16 17:47:07 -06:00
4702d19122 Add +4 as a possible enchantment 2024-09-10 22:18:59 -04:00
7e063ab1ed dialogxml schema: fix <field> missing positioning attributes 2024-09-10 22:18:59 -04:00
a4231005f6 Add a new "rechargeable" flag to items
A way to set this flag is not yet exposed in the scenario editor.
The flag is intended only for non-stackable items, but this currently isn't enforced.
Items now have a maximum number of charges, which is equal to their default number set in the item record.
Enchanted items with charges are now rechargeable.
2024-09-10 22:18:59 -04:00
6965b822dc Gather all enchantment info into a single place
This also resolves several TODO notes about duplicate code and makes cPresetItem::ability an eEnchant
2024-09-10 22:18:59 -04:00
7f12c6eea4 Support underlined text in DialogXML 2020-02-26 01:20:11 -05:00
49d88c76e2 Add page definition facility to the DialogXML <stack> widget
- New <page> element in <stack>
- Visibility of elements is now remembered when switching pages
- Unstoring a <pict> on a stack page no longer resets default values
- Documentation updated for new features
2020-02-25 21:05:59 -05:00
c8549ca680 DialogXML: Support <key> in <text> with optional ref= 2020-02-23 23:02:16 -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
335fb87e51 Store custom graphics classifications as symbols instead of integers 2020-02-09 12:10:52 -05:00
4e9117035d Small improvements to scenario validation script
- Now works for paths containing spaces
- No longer deletes the scenario/ folder if the scenario was already called that
2016-09-17 19:23:16 -04:00
bd3aa33807 Schemas: Fix indentation 2015-10-06 22:17:27 -04:00
5667849835 Dialog schema: Convert indentation to tabs 2015-10-06 22:17:27 -04:00
f0af9ff67f Schemas: Enforce root element by eliminating global element declarations 2015-10-06 22:17:27 -04:00
68eec0fe16 Some schema updates
- Store timers as a type instead of an element in the common schema
- Fix errors in terrain and monster schemas
2015-10-06 22:17:26 -04:00
8afd3825b0 Refactor the dialog engine's event handling to make it easier to add new events in the future
- Focus event split into focus and defocus
- Scroll event added but not yet properly implemented

Also:
- Remove the useless (and ignored) clickable attributes from the schema
- Pave the way for controls other than fields to be able to recieve keyboard focus
2015-10-03 19:49:33 -04:00
8b90fa614b Make stack control a real container instead of a controller
- Also add framed/outlined attributes to it and to LED groups
2015-10-03 12:30:26 -04:00
b176918dda DialogXML: Make the frame style format parameter a first-class citizen
- It's now exposed in the schema with a new attribute, outline, on all elements that accept framed
- It now has four possible values: solid, outset, inset, double. Dashed or dotted may be added later; they're a lot harder.
- Second make scenario dialog uses a custom frame style
2015-10-03 11:13:33 -04:00
03bc3d05e6 Remove key-mod attribute from dialog schema
- Modifiers are now given in the def-key attribute, as originally intended
- Dialogs that have a help button now assign F1 to that button (replacing shift+/ in some cases)
- F1 also brings up help in the main game (in addition to shift+/)
2015-10-03 00:53:32 -04:00
1b75bb4755 Add constraint for defbtn attribute to refer to a valid name in the dialog schema 2015-10-02 23:31:02 -04:00
b39ac35298 New alternate scrollbar style, used by default in dialogs 2015-10-02 23:31:01 -04:00
4aea031914 Add linked element to scrollbars
The linked element will be updated dynamically as the scrollbar's value changes.
Also: Added long-missing hasControl() method to cDialog
2015-10-02 22:59:04 -04:00