Commit Graph

381 Commits

Author SHA1 Message Date
99350a5eec Help dialog from other dialog: preserve z order 2025-05-11 10:49:44 -05:00
db11f2c20e comments 2025-05-11 10:49:39 -05:00
aeaee9bbdb Debug action to fix the elusive font corruption bug 2025-05-11 10:49:38 -05:00
20373acf68 pass parent to preview dialog 2025-05-11 10:49:37 -05:00
e2e7907e1a example preview button for ONCE_DIALOG 2025-05-11 10:49:36 -05:00
fe57c10173 move custom_choice_dialog into shared code 2025-05-11 10:49:35 -05:00
22617273ee Fix showing errors from replaying dialogs 2025-05-11 10:49:34 -05:00
973cd71627 Replay errors show line number of action
I would have done this FOREVER ago but every time I looked
in ticpp for a way to get element file positions I somehow
missed Row() and Column()
2025-05-11 10:49:33 -05:00
07c15dc1e7 Fix window focus bugs for Windows 2025-05-11 10:49:31 -05:00
58107f1856 str("") is unsafe on its own for clearing stream 2025-05-11 10:49:27 -05:00
e529c9273f make basicbutton no-key DRY 2025-05-11 10:49:25 -05:00
5d7f3088e9 move minimap logic out of dialog 2025-05-11 10:49:24 -05:00
06624d810c try to fix linker errors without new globals 2025-05-11 10:49:23 -05:00
98e87b155d annotate a fallthrough for Xcode 2025-05-11 10:49:22 -05:00
4041d0c1b2 Let the minimap be hidden by other applications in focus 2025-05-11 10:49:21 -05:00
3ba9259482 Remember window positions as preferences 2025-05-11 10:49:21 -05:00
6f02e3128d Fix hidden container children accepting hotkey input 2025-05-11 10:49:19 -05:00
80e045cfa3 3-choice dialogs make OK/Leave always leftmost" 2025-05-06 15:24:13 -05:00
6666a2753f custom choice dialogs Stay/Leave can't both use Enter Key.
And since depending on context they could both mean 'Cancel' but 'Leave' could be a positive action in some contexts, I've just given them no keys.
2025-05-06 15:24:13 -05:00
72ff67ceab dialogs ignore <error> actions 2025-05-06 15:24:13 -05:00
02f7828a08 map ctrl+f to key_find (which does nothing) 2025-03-30 11:51:15 -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
1c11810f58 fix crash in string picker search feature 2025-03-30 11:51:05 -05:00
53bb8a6d26 focus the search field when showing 2025-03-30 11:51:05 -05:00
f26a9e9c32 Fix awkwardness of Enter key in string picker
Search field starts out hidden. When the button is
clicked, the field and other controls appear, and
the button takes over the enter key. Ctrl+Enter
clicks okay (so if search is not opened, either
Enter OR Ctrl+Enter will click okay)
2025-03-30 11:51:04 -05:00
aa029f6bdc Ctrl+f in text field should not type 'f' 2025-03-30 11:51:04 -05:00
a17f5b1a7c String picker search field. Fix #701 2025-03-30 11:51:03 -05:00
341c285a39 Refactor allows cLedGroup leds to use relative positioning 2025-03-30 11:51:01 -05:00
9115f6416f fix debug help dialog 2025-03-19 19:31:23 -05:00
1ab5a9f5e9 move choose_status_effect to common code for a debug action 2025-03-19 19:31:22 -05:00
8c48cbab4f useful functions for control text manipulation 2025-03-19 19:31:18 -05:00
70745c1341 fix one way buttons could appear depressed after release. 2025-03-19 19:31:16 -05:00
fc919cc234 dialogs handle hotkeys on controls in containers 2025-03-19 19:31:15 -05:00
654176ac47 Make the dialog size sanity check give a little leeway for dialogs that don't quite fit on the screen.
Otherwise, you can't even use the preferences to set the scaling factor back down if it was set so high that the preferences don't fit.
2025-03-16 14:03:53 -04: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
16703ae7a2 Don't implicitly call recalcRect() 2025-03-16 14:03:53 -04:00
9eb0e4db26 stack default frameStyle to none (fixes white lines) 2025-03-16 14:03:53 -04:00
87ee60d0b4 Fix left/right not changing page in scenario picker 2025-03-16 14:03:53 -04:00
5cfc6ba328 Fix all the compile warnings that occur on Mac.
(Except the OpenGL deprecation warning and some warnings coming from Boost.Process.)
2025-03-08 20:43:04 -05:00
c032307280 Add picker buttons and a cancel button to the Set Variable Town Entry dialog
Partially addresses #685
2025-03-08 20:05:12 -05:00
628b0ee677 Add a new spell pattern picker.
The picker is used in the special node dialog and also in monster abilities.

Some changes were made to the game as well:
* If the rotatable wall is used for a field missile or touch ability, there's no longer an option for the designer to pick an orientation. Instead, it behaves like the rotatable wall in a radiate field ability, selecting an orientation based on the creature's facing direction.
* The magic values sent to place_spell_pattern for direct damage were rearranged to match the order of the eDamageType enum. This should have no effect, since the core place_spell_pattern function is only called by the various wrapper overloads. It also simplifies the code quite a bit.
* The Protective Circle spell pattern is now exposed to the place patten special nodes. It can be used as just a radius 4 circle, but the effect of different layers of fields can also be obtained by specifying a field type or damage type of -1.

There is also a change to the dialog engine:
* Calling setText() also implicitly calls recalcRect()
2025-03-08 20:05:12 -05:00
4c4c70648c Add a fill-color attribute to <pict> 2025-03-08 20:05:12 -05:00
531384844e Better function name for cStack changeSelectedPage() 2025-03-07 08:43:19 -05:00
f9695887ec hidden controls don't handleClick() 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
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
14c36ed5a8 Debug action: crash the game 2025-03-06 21:24:07 -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
434577426e Make -2 the magic infinite loops value 2025-03-05 19:27:10 -05:00
9b4af4e69c Let individual dialogs toggle pict animations 2025-03-05 19:27:10 -05:00