|
1 | 1 | package casterui.io; |
2 | 2 |
|
3 | | -import arc.KeyBinds; |
4 | | -import arc.input.InputDevice; |
5 | | -import arc.input.KeyCode; |
6 | | - |
7 | | -public enum CuiBinding implements KeyBinds.KeyBind { |
8 | | - track_cursor(KeyCode.h, "cui"), |
9 | | - last_destroyed_core(KeyCode.g), |
10 | | - toggle_cui_menu(KeyCode.f7), |
11 | | - change_teams(KeyCode.home), |
12 | | - |
13 | | - spectate_next_player(KeyCode.semicolon, "cui-cycle"), // [ & ] is used by default cargo pickup/drop mb |
14 | | - spectate_previous_player(KeyCode.apostrophe), |
15 | | - spectate_next_core(KeyCode.unknown), |
16 | | - spectate_previous_core(KeyCode.unknown), |
17 | | - spectate_ignore_coreless(KeyCode.unknown), |
18 | | - |
19 | | - toggle_units_player_table_controls(KeyCode.unknown, "cui-counter"), |
20 | | - toggle_table_core_units(KeyCode.unknown), |
21 | | - toggle_table_summarize_players(KeyCode.unknown), |
22 | | - |
23 | | - toggle_player_cursor(KeyCode.unknown, "cui-trackers"), |
24 | | - filter_player_cursor(KeyCode.unknown), |
25 | | - toggle_track_logic(KeyCode.unknown), |
26 | | - toggle_unit_cmd(KeyCode.unknown), |
27 | | - toggle_unit_Cmd_type(KeyCode.unknown), |
28 | | - |
29 | | - |
30 | | - toggle_unit_hp_bars(KeyCode.unknown, "cui-settings"), |
31 | | - toggle_shorten_items_info(KeyCode.unknown), |
32 | | - toggle_block_hp(KeyCode.unknown), |
33 | | - toggle_team_items(KeyCode.unknown), |
34 | | - toggle_shorten_team_items(KeyCode.unknown), |
35 | | - toggle_alerts_circle(KeyCode.unknown), |
36 | | - toggle_alerts_circle_reverse_growth(KeyCode.unknown), |
37 | | - toggle_alerts_toast(KeyCode.unknown), |
38 | | - toggle_alerts_toast_bottom(KeyCode.unknown), |
39 | | - toggle_factory_style(KeyCode.unknown), |
40 | | - toggle_domination(KeyCode.unknown), |
41 | | - |
42 | | - toggle_cui_kill_switch(KeyCode.unknown), |
43 | | - |
44 | | - map_player_1 (KeyCode.num1,"cui-player-mapping"), |
45 | | - map_player_2(KeyCode.num2), |
46 | | - map_player_3(KeyCode.num3), |
47 | | - map_player_4(KeyCode.num4), |
48 | | - map_player_5(KeyCode.num5), |
49 | | - map_player_6(KeyCode.num6), |
50 | | - map_player_7(KeyCode.num7), |
51 | | - map_player_8(KeyCode.num8), |
52 | | - map_player_9(KeyCode.num9), |
53 | | - map_player_10(KeyCode.unknown), |
54 | | - |
55 | | - save_camera (KeyCode.unknown,"cui-camera-mapping"), |
56 | | - move_camera (KeyCode.unknown), |
57 | | - map_camera_1 (KeyCode.unknown), |
58 | | - map_camera_2(KeyCode.unknown), |
59 | | - map_camera_3(KeyCode.unknown), |
60 | | - map_camera_4(KeyCode.unknown), |
61 | | - map_camera_5(KeyCode.unknown), |
62 | | - map_camera_6(KeyCode.unknown), |
63 | | - map_camera_7(KeyCode.unknown), |
64 | | - map_camera_8(KeyCode.unknown), |
65 | | - map_camera_9(KeyCode.unknown), |
66 | | - map_camera_10(KeyCode.unknown), |
67 | | - |
68 | | - |
| 3 | +import arc.input.*; |
| 4 | + |
| 5 | +public class CuiBinding { |
| 6 | + |
| 7 | + public static final KeyBind |
| 8 | + toggle_cui_kill_switch = KeyBind.add("cui-toggle_cui_kill_switch", KeyCode.unset, "cui"), |
| 9 | + track_cursor = KeyBind.add("cui-track_cursor", KeyCode.h, "cui"), |
| 10 | + last_destroyed_core = KeyBind.add("cui-last_destroyed_core", KeyCode.g, "cui"), |
| 11 | + toggle_cui_menu = KeyBind.add("cui-toggle_cui_menu", KeyCode.f7, "cui"), |
| 12 | + change_teams = KeyBind.add("cui-change_teams", KeyCode.home, "cui"), |
| 13 | + |
| 14 | + spectate_next_player = KeyBind.add("cui-spectate_next_player", KeyCode.semicolon, "cui-spectate"), |
| 15 | + spectate_previous_player = KeyBind.add("cui-spectate_previous_player", KeyCode.apostrophe, "cui-spectate"), |
| 16 | + spectate_next_core = KeyBind.add("cui-spectate_next_core", KeyCode.unset, "cui-spectate"), |
| 17 | + spectate_previous_core = KeyBind.add("cui-spectate_previous_core", KeyCode.unset, "cui-spectate"), |
| 18 | + spectate_ignore_coreless = KeyBind.add("cui-spectate_ignore_coreless", KeyCode.unset, "cui-spectate"), |
| 19 | + |
| 20 | + toggle_units_player_table_controls = KeyBind.add("cui-toggle_units_player_table_controls", KeyCode.unset, "cui-counter"), |
| 21 | + toggle_table_core_units = KeyBind.add("cui-toggle_table_core_units", KeyCode.unset, "cui-counter"), |
| 22 | + toggle_table_summarize_players = KeyBind.add("cui-toggle_table_summarize_players", KeyCode.unset, "cui-counter"), |
| 23 | + |
| 24 | + toggle_player_cursor = KeyBind.add("cui-toggle_player_cursor", KeyCode.unset, "cui-trackers"), |
| 25 | + filter_player_cursor = KeyBind.add("cui-filter_player_cursor", KeyCode.unset, "cui-trackers"), |
| 26 | + toggle_track_logic = KeyBind.add("cui-toggle_track_logic", KeyCode.unset, "cui-trackers"), |
| 27 | + toggle_unit_cmd = KeyBind.add("cui-toggle_unit_cmd", KeyCode.unset, "cui-trackers"), |
| 28 | + toggle_unit_Cmd_type = KeyBind.add("cui-toggle_unit_Cmd_type", KeyCode.unset, "cui-trackers"), |
| 29 | + |
| 30 | + toggle_unit_hp_bars = KeyBind.add("cui-toggle_unit_hp_bars", KeyCode.unset, "cui-settings"), |
| 31 | + toggle_shorten_items_info = KeyBind.add("cui-toggle_shorten_items_info", KeyCode.unset, "cui-settings"), |
| 32 | + toggle_block_hp = KeyBind.add("cui-toggle_block_hp", KeyCode.unset, "cui-settings"), |
| 33 | + toggle_team_items = KeyBind.add("cui-toggle_team_items", KeyCode.unset, "cui-settings"), |
| 34 | + toggle_shorten_team_items = KeyBind.add("cui-toggle_shorten_team_items", KeyCode.unset, "cui-settings"), |
| 35 | + toggle_alerts_circle = KeyBind.add("cui-toggle_alerts_circle", KeyCode.unset, "cui-settings"), |
| 36 | + toggle_alerts_circle_reverse_growth = KeyBind.add("cui-toggle_alerts_circle_reverse_growth", KeyCode.unset, "cui-settings"), |
| 37 | + toggle_alerts_toast = KeyBind.add("cui-toggle_alerts_toast", KeyCode.unset, "cui-settings"), |
| 38 | + toggle_alerts_toast_bottom = KeyBind.add("cui-toggle_alerts_toast_bottom", KeyCode.unset, "cui-settings"), |
| 39 | + toggle_factory_style = KeyBind.add("cui-toggle_factory_style", KeyCode.unset, "cui-settings"), |
| 40 | + toggle_domination = KeyBind.add("cui-toggle_domination", KeyCode.unset, "cui-settings"), |
| 41 | + |
| 42 | + map_player_1 = KeyBind.add("cui-map_player_1", KeyCode.num1, "cui-mapping"), |
| 43 | + map_player_2 = KeyBind.add("cui-map_player_2", KeyCode.num2, "cui-mapping"), |
| 44 | + map_player_3 = KeyBind.add("cui-map_player_3", KeyCode.num3, "cui-mapping"), |
| 45 | + map_player_4 = KeyBind.add("cui-map_player_4", KeyCode.num4, "cui-mapping"), |
| 46 | + map_player_5 = KeyBind.add("cui-map_player_5", KeyCode.num5, "cui-mapping"), |
| 47 | + map_player_6 = KeyBind.add("cui-map_player_6", KeyCode.num6, "cui-mapping"), |
| 48 | + map_player_7 = KeyBind.add("cui-map_player_7", KeyCode.num7, "cui-mapping"), |
| 49 | + map_player_8 = KeyBind.add("cui-map_player_8", KeyCode.num8, "cui-mapping"), |
| 50 | + map_player_9 = KeyBind.add("cui-map_player_9", KeyCode.num9, "cui-mapping"), |
| 51 | + map_player_10 = KeyBind.add("cui-map_player_10", KeyCode.num0, "cui-mapping"), |
| 52 | + |
| 53 | + save_camera = KeyBind.add("cui-save_camera", KeyCode.unset, "cui-camera"), |
| 54 | + move_camera = KeyBind.add("cui-move_camera", KeyCode.unset, "cui-camera"), |
| 55 | + map_camera_1 = KeyBind.add("cui-map_camera_1", KeyCode.unset, "cui-camera"), |
| 56 | + map_camera_2 = KeyBind.add("cui-map_camera_2", KeyCode.unset, "cui-camera"), |
| 57 | + map_camera_3 = KeyBind.add("cui-map_camera_3", KeyCode.unset, "cui-camera"), |
| 58 | + map_camera_4 = KeyBind.add("cui-map_camera_4", KeyCode.unset, "cui-camera"), |
| 59 | + map_camera_5 = KeyBind.add("cui-map_camera_5", KeyCode.unset, "cui-camera"), |
| 60 | + map_camera_6 = KeyBind.add("cui-map_camera_6", KeyCode.unset, "cui-camera"), |
| 61 | + map_camera_7 = KeyBind.add("cui-map_camera_7", KeyCode.unset, "cui-camera"), |
| 62 | + map_camera_8 = KeyBind.add("cui-map_camera_8", KeyCode.unset, "cui-camera"), |
| 63 | + map_camera_9 = KeyBind.add("cui-map_camera_9", KeyCode.unset, "cui-camera"), |
| 64 | + map_camera_10 = KeyBind.add("cui-map_camera_10", KeyCode.unset, "cui-camera") |
69 | 65 | ; |
70 | 66 |
|
| 67 | + public static void init(){} |
71 | 68 |
|
72 | | - private final KeyBinds.KeybindValue defaultValue; |
73 | | - private final String category; |
74 | | - |
75 | | - CuiBinding(KeyBinds.KeybindValue defaultValue, String category) { |
76 | | - this.defaultValue = defaultValue; |
77 | | - this.category = category; |
78 | | - } |
79 | | - |
80 | | - CuiBinding(KeyBinds.KeybindValue defaultValue) { |
81 | | - this(defaultValue, null); |
82 | | - } |
83 | | - |
84 | | - @Override |
85 | | - public KeyBinds.KeybindValue defaultValue(InputDevice.DeviceType type) { |
86 | | - return defaultValue; |
87 | | - } |
88 | | - |
89 | | - @Override |
90 | | - public String category() { |
91 | | - return category; |
| 69 | + public static boolean isUnSet(KeyBind e) { |
| 70 | + return e.value == null || e.value.key == KeyCode.anyKey || e.value.key == KeyCode.unknown; |
92 | 71 | } |
93 | | - |
94 | | - |
95 | 72 | } |
0 commit comments