You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a few refinements to the new comm node selection feature
1. Don't display the selection arrows until the selection is actually moved, to avoid interfering with the standard selection feature
2. Use static variables and the new `TIMESTAMP` data type
3. Minor cleanup
Follow-up to #6736.
int Num_menu_items = -1; // number of items for a message menu
109
109
110
-
int First_menu_item = -1; // index of first item in the menu. This tracks what element of comms options collection is displayed as first option, and displays the next 9 options. Changes only by +/- MAX_MENU_ITEMS (10)
111
-
int Selected_menu_item = First_menu_item; //!< index of selected item in the menu. Possible index range: 0 - 9, assuming MAX_MENU_ITEMS == 10, and First_menu_item gets initialized
112
-
SCP_string Lua_sqd_msg_cat;
110
+
staticint First_menu_item = -1; // index of first item in the menu. This tracks what element of comms options collection is displayed as first option, and displays the next 9 options. Changes only by +/- MAX_MENU_ITEMS (10)
111
+
staticint Selected_menu_item = First_menu_item; //!< index of selected item in the menu. Possible index range: 0 - 9, assuming MAX_MENU_ITEMS == 10, and First_menu_item gets initialized
112
+
staticbool Display_selector = false;
113
+
static SCP_string Lua_sqd_msg_cat;
113
114
114
115
#defineMAX_KEYS_NO_SCROLL10
115
116
#defineMAX_KEYS_USED12// maximum number of keys used for the messaging system
@@ -220,8 +221,10 @@ void hud_squadmsg_start()
220
221
Num_menu_items = -1; // reset the menu items
221
222
First_menu_item = 0;
222
223
Selected_menu_item = First_menu_item; // make first menu item a selected object
224
+
Display_selector = false;
225
+
223
226
Squad_msg_mode = SM_MODE_TYPE_SELECT; // start off at the base state
224
-
Msg_mode_timestamp = timestamp(DEFAULT_MSG_TIMEOUT); // initialize our timer to bogus value
227
+
Msg_mode_timestamp = _timestamp(DEFAULT_MSG_TIMEOUT); // initialize our timer to bogus value
225
228
Msg_shortcut_command = -1; // assume no shortcut key being used
226
229
Msg_target_objnum = Player_ai->target_objnum; // save the players target object number
227
230
Msg_targeted_subsys = Player_ai->targeted_subsys; // save the players currently targted subsystem
0 commit comments