z64555
19c0f64736
Upgrade a few Assert()'s into Assertion()'s with error messages
2021-03-07 09:56:21 -06:00
z64555
78ac82d6eb
Replace Int3()'s with UNREACHABLE
...
* control_config_bind_btn uses UNREACHABLE macro when an unknown order is passed to it
2021-03-07 09:20:34 -06:00
z64555
5c9582aefc
Fix bug where "Clear Conflict" button was disabled on Ship tab unless the conflicted items included an axis.
2021-03-06 12:52:48 -06:00
z64555
1fca306fc9
Address clang-tidy issues.
2021-02-22 14:24:26 -06:00
z64555
754f0ea876
Removed unused local variable.
2021-02-14 10:33:49 -06:00
z64555
9145922cb1
Fix default_item to use default_bindings.
2021-02-14 09:59:36 -06:00
z64555
47e19207f9
Merge branch 'master' into controls3
...
Resolved Conflicts:
code/controlconfig/controlsconfig.cpp
code/controlconfig/controlsconfig.h
2021-02-14 09:48:55 -06:00
MageKing17
29fbebde16
If the first #ControlConfigOverride isn't named, use "default".
...
This causes it to replace the first preset in the list, which more closely approximates the old behavior.
2021-02-10 17:58:08 -08:00
z64555
cb692b22ba
Add note comment to the CCI_builder. Controls that don't work in retail should be default disabled, but this relies on the coders making them to get it set the first time.
2021-02-07 14:23:44 -06:00
z64555
15d3dde5fa
Unhide non-retail controls by default. Even though retail data can't make use of most of them, some mods may count on their visibility.
2021-02-07 14:06:27 -06:00
Allen A. Babb
b3edc683fc
Merge pull request #2907 from z64555/feature/controls2
...
Controls 0, 1, and 2 - Vectorize Controls_config, Refactor Control Presets, and Use Undosys for undo/redo actions done in the Controls configuration menu.
2021-01-30 10:04:58 -06:00
z64555
9b42819dce
Address Clang-Tidy issues.
2021-01-29 15:09:54 -06:00
z64555
c1d1a965c6
Think I got all of the index swapped. *Scrolls right* oh.
2021-01-29 04:40:58 -06:00
z64555
b97e804123
Address signed/unsigned complaint.
2021-01-28 23:54:44 -06:00
z64555
d6672d01cf
Don't count an item in the reset check if the item is disabled.
...
* Remove errant Assert()
* Drop leading whitespace of preset $Name field
* Fix do_reset behavior due to incorrect default binding check. Fix is possibly a backport.
* When $Text is specified for a bind item, set the XStr index to 0.
2021-01-28 19:16:07 -06:00
Birk Magnussen
25cca192db
Switch Key Names from internal encoding to unicode in utf8 mode
2021-01-26 19:09:20 +09:00
Birk Magnussen
e6067f756a
Fix special char hex codes for utf8
2021-01-26 13:53:25 +09:00
z64555
89a2c4dbcb
Missed another break.
2020-12-12 14:47:15 -06:00
z64555
2cd557e483
Expletives and default breaks.
2020-12-12 14:20:07 -06:00
z64555
e5df64ab75
Address uninitialized variable issue.
2020-12-12 12:20:54 -06:00
z64555
36a2355e86
Address exceedingly frivolous signed/unsigned mismatch errors.
2020-12-11 17:44:45 -06:00
z64555
351e8e0c44
Address short/int size mismatches.
2020-12-11 15:59:31 -06:00
z64555
91e0d8f578
QoL: Highlight/select the found key, be it primary or secondary, should the search mode find it.
2020-12-11 12:41:46 -06:00
z64555
f8f26e3b23
Fix bug where search mode wouldn't detect joy buttons correclty.
...
* Fix bug where joy hats were ignored.
2020-12-11 12:41:46 -06:00
z64555
873a3c3442
Fix bug with displaying joy button text
...
* Fix a number of warnings
2020-12-11 12:41:46 -06:00
z64555
1318b814d3
Fix out-of-bounds error due to axis controls index.
2020-12-11 12:41:45 -06:00
z64555
4c8f5f789c
Grey out empty/unbound items
...
* Joy axis bindings now use the same color logic as the keys and buttons
2020-12-11 12:41:45 -06:00
z64555
b9b922b235
Fix bug where int conflict wasn't incremented for unselected items.
...
* Fix color highlighting of mouse-over lines
* Fix color highlighting of selected bindings
* Fix bug when trying to select an item while the selected line is an axis control
* Allow user to select an empty item
* Expand hitbox of items so players aren't required to click exactly on the text to select it.
2020-12-11 12:41:45 -06:00
z64555
716b4a3205
Moves the listbox draw function out of do_frame()
...
* Adjusts listbox positioning and widths of the binding columns for better display.
* Adds DCF tools to adjust the text positioning in the listbox
2020-12-11 12:41:44 -06:00
z64555
3c592b799f
Fix bug where the "disallowed key" popup would spam you, blocking you from doing a meaningful bind.
2020-12-11 12:41:44 -06:00
z64555
c8c8a8d896
Fix bug where unbound items were flagged as conflicted.
...
* Fix bug where Cc_lines was accessed after being cleared. (Incorrectly assumed control_config_cancel_exit() was an exit point)
2020-12-11 12:41:43 -06:00
z64555
12b19a32bd
Fix bug where unbound joy buttons would persist as a valid binding.
2020-12-11 12:41:43 -06:00
z64555
40e114351c
Miscellaneous fixes to allow building.
...
* declare CCB before CC_bind.
* update various functions to use new binding aggregate classes.
2020-12-11 12:41:43 -06:00
z64555
704c600ef0
update control_config_clear()
2020-12-11 12:41:42 -06:00
z64555
5dde26fc33
Update check_control_used() to use primary and secondary.
2020-12-11 12:41:42 -06:00
z64555
cb5f80b0d5
Complete refactor of control_config_do_frame()
...
* Add textify method to CC_bind
* Replace string printing of key and joy bindings with primary and secondary bindings.
2020-12-11 12:41:42 -06:00
z64555
32636968bd
Refactor browse mode in control_config_do_frame()
...
* Allow joy button presses to dismiss help overlay while in browse mode
* Refactor selected item cycling
2020-12-11 12:41:41 -06:00
z64555
e546a75c6b
Fix possible bug where joy btn was ignored in bind mode
...
* Refactor search mode in control_config_do_frame()
* Dismiss help overlay in search mode when joy button is pressed
* Fix possible bug where nav buttons were not reset in search mode
2020-12-11 12:41:41 -06:00
z64555
9b0aab3f82
replace CCI::joy_id and ::key_id with ::primary and ::secondary (through inheritance of CCB)
...
* Add convenience methods to CCB
* Convert CC_bind into a class and define convenience methods
* Set underlying type of enum CID to short
* controlconfigdefaults.tbl: Should the CCI be disabled by an override, clear its binding.
* Control config menu: Should the help overlay be active during bind mode, dismiss it, don't bind anything, and stay in bind mode (fixes inconstant behavior)
* Refactor bind mode handling in control_config_do_frame()
2020-12-11 12:41:40 -06:00
z64555
7f2baec387
Remove Control_config::key_default and ::joy_default, redirect calls to the default presets
2020-12-11 12:41:40 -06:00
z64555
577ae95026
Use ints instead of size_t because CI said so.
2020-12-11 07:40:42 -06:00
z64555
968d76431f
Missing an amp.
2020-12-11 07:40:42 -06:00
z64555
c2408839d1
Fix out of bounds error due to dynamic containers cleared at wrong spot.
2020-12-11 07:40:41 -06:00
z64555
a03af2e4a9
Re-enables the undo feature in the controls config menu.
2020-12-11 07:40:41 -06:00
z64555
636b4b12e4
Vectorize control_config::Conflicts
2020-12-11 07:40:14 -06:00
z64555
93c96b8943
Re-enable display of current selected preset.
2020-12-11 07:40:14 -06:00
z64555
d1f94c7b92
Fix overwrite check.
...
Add check for cfile open correctly.
2020-12-11 07:40:13 -06:00
z64555
74ffcb2db8
Print "NONE" instead of "-1" For unbound keys.
2020-12-11 07:40:13 -06:00
z64555
c7112fd897
Adds function to write controlconfigdefaults.tbl using the default preset at time of call.
...
* Adds DC function 'write_ccd' to write the .tbl
* Adds DC function 'load_ccd' to reload the .tbl
2020-12-11 07:40:13 -06:00
z64555
1bb9ed8832
Remove unused variable for catch clause.
2020-12-11 07:40:13 -06:00