Commit Graph

308 Commits

Author SHA1 Message Date
5a9c2cd17b explicit bool logic grouping 2025-02-19 19:39:32 -06:00
c94228c99c Default controls keep their hotkey AND the enter key 2025-02-19 19:29:02 -06:00
a669fe0223 handle showPipes in code only. Fix #609 2025-02-18 09:37:29 -05:00
8cff2428a9 DRY advanced town help. Fix #611 2025-02-16 00:02:22 -05:00
83ae5eaa1b make Done & Race buttons use scaled text 2025-02-15 16:15:33 -06:00
f2248c766e Allow line-wrapped button labels 2025-02-15 16:14:31 -06:00
7383b39e69 Debug action: Preview every dialog layout 2025-02-15 16:04:32 -05:00
ec4094cf29 Fix line breaks being ignored. Fix #608 2025-02-15 16:04:32 -05:00
65cf27bc81 Reorganize Advanced Town Details and add some instant help
It now uses relative positioning as well.

Fix #546
2025-02-15 11:33:40 -05:00
46c102257b make give_help()'s force_help a bool arg 2025-02-15 11:19:44 -05:00
576a40b3e1 make give_help() DRY 2025-02-15 11:19:44 -05:00
d3dff69d1a Fix a help dialog that appears in the top-left 2025-02-15 11:19:44 -05:00
fcf0bcc324 add show-pipes attribute to <text> 2025-02-09 20:37:46 -06:00
cd556335a5 fix preview dialogxml crash 2025-02-09 11:41:49 -06:00
81114d0202 set pointSize, underline, font, before calculate_layout early return 2025-02-09 11:28:29 -06:00
c079d0f5a9 Allow int value for text size in dialogxml 2025-02-09 11:16:24 -06:00
bc5f42a870 quick implementation of previewing dialogxml for #564 (#565) 2025-02-03 09:20:42 -05:00
9fd468f578 Merge pull request #548 from NQNStudios:talk-keys
Better editing for talk node keys

* The fields start out empty, and it is *allowed* to keep *one of them* empty. (A node only needs one key to be useful, right?
* When the node is saved, empty strings are replaced with `"    "`. If this is not harmless to the game logic, then I'll need to make the game aware that either key might be `"    "`.
* You cannot type more than 4 characters in these fields (unless there's a way to insert characters I'm not aware of).
* If you put 'buy' in a field, it automatically becomes 'purc'.
* There is a note next to the response keys (kind of squished in the corner) enumerating the special logic of the in-game Buy and Sell buttons.
2025-02-02 13:57:55 -05:00
e9997eb9ba new debug action: fight an outdoor encounter 2025-01-25 21:46:25 -06:00
2809cd8eef convert to wchar_t for windows compilers 2025-01-25 21:46:25 -06:00
b1efc03029 Huge makeover for debug keys 2025-01-25 19:45:08 -06:00
de45b379e3 add max-chars attribute to text field 2025-01-23 20:12:32 -06:00
2ec456b9ef Merge pull request #536 from NQNStudios:recast-hint
Quality of life: Spellcasting

This makes changes to the spellcasting UI.

* M or P to recast will no longer default to Light or Minor Bless/Minor Heal. You need to cast something before recast becomes available. This fixes #535 and I think it's disorienting when I've just started the game and M casts Light in a town that's fully lit, so the change is generally good I'd say.
* I implemented a recasting hint in the text bar, which was one of the things I mentioned in my quality-of-life checklist https://github.com/NQNStudios/cboe/issues/16. It replaces the status icons in combat mode.
* Sometimes when my eyes glaze over, I think I'm casting the spell on the wrong side of the LED. I thought there was a bug when I cast Long Light instead of Dumbfound (even though I know the distance between the two is pretty large -- I wasn't paying much attention). I thought it would be nice to highlight the name of the selected spell. Light green seemed to make more sense than red for that, because the LED turns green. Then I made the caster/target selection texts also use light green instead of red, to match. Uncastable spells are grey.
2025-01-23 09:30:08 -05:00
ce7c5ed525 clarify cStringChoice cancel behavior 2025-01-21 16:26:28 -06:00
daecca4abe dialogxml parseColor use a map built from Colours constants
parseColor() was doing a big if-else with string comparisons,
and returning values that differed from our Colours constants.
Since I couldn't find an instance of the colour attribute in our
existing xml, it should be safe to do away with those conflicting
values and refactor parseColor() to match the constants
and use cleaner code.
2025-01-20 13:44:31 -06:00
78e3c46b05 don't check for interrupt in confirmation dlg 2025-01-16 16:53:35 -06:00
62313e5bd6 allow interrupting replay 2025-01-16 16:53:34 -06:00
15d169b084 fix clickable bounds of leds in cStringChoice 2025-01-11 21:50:35 -05:00
8253088ba4 remove the cancel button in case where it would be ignored 2025-01-07 21:35:59 -05:00
3bd9154412 rename new led attribute 'label-pos' 2024-12-03 09:44:40 -05:00
dd1b4a66bb remove accidental semicolon, fix led measurements 2024-12-03 09:44:40 -05:00
c913b11047 simplify convoluted if statement 2024-12-03 09:44:40 -05:00
c35ba7cc62 LEDs allow text on the left side 2024-12-03 09:44:40 -05:00
121f54fbe2 make defaultTextSize() static 2024-12-03 09:44:40 -05:00
bf84a15087 fix constant names 2024-12-03 09:44:40 -05:00
cfdd6304fd change constant names 2024-12-03 09:44:40 -05:00
df1e9d6bb4 remove cButton::setTextSize() 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
f47229417b still require width on other button types 2024-12-03 09:44:40 -05:00
9fb5cdbefd leds and tiny buttons measure actual preferred width 2024-12-03 09:44:40 -05:00
ed3dcd9246 make button text size changeable 2024-12-03 09:44:40 -05:00
df0c46d616 Merge pull request #458 from NQNStudios:credits-overhaul
Auto-generated credits / Update the credits from IndieGOGO
2024-11-23 18:54:51 -05:00
b441401475 wrap pollEvent() to guarantee all loops handle modifiers (#477) 2024-11-23 17:46:54 -05:00
888b86404c move forward declaration 2024-11-19 18:54:06 -06:00
9d972a3961 Pick the largest suitable default scale. Fix #468 (#472) 2024-11-19 19:17:15 -05:00
cd6c0a0a30 link controls auto-add click handler 2024-11-19 15:06:43 -06:00
a551da6299 add very rudimentary right-alignment text option 2024-11-16 17:47:07 -06:00
d47249b404 rename control_click to click_control 2024-11-10 00:32:17 -05:00
8a9fb0ed22 dialogxml: ensure a container's contents have been resolved before resolving anything else relative to the container 2024-09-10 22:18:59 -04:00
1db98bc7c0 dialogxml: Search for anchor widgets recursively within containers
Aso throw an error if relative attribute is missing when an anchor is specified
2024-09-10 22:18:59 -04:00