DEADSOFTWARE

Initial Player Indicator Implementation.
[d2df-sdl.git] / src / game / g_menu.pas
index 23fbf2e947c3f77ac7a455db154a71b120ad6c97..2c3f85153e2ec850f69fade3f52fdda927f0272d 100644 (file)
@@ -160,6 +160,7 @@ begin
   gShowMessages := TGUISwitch(menu.GetControl('swMessages')).ItemIndex = 0;
   gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0;
   gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex;
+  gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex = 0;
   g_dbg_scale := TGUIScroll(menu.GetControl('scScaleFactor')).Value + 1;
 
   menu := TGUIMenu(g_GUI_GetWindow('OptionsControlsMenu').GetControl('mOptionsControlsMenu'));
@@ -511,6 +512,9 @@ begin
 
   with TGUISwitch(menu.GetControl('swChatBubble')) do
     ItemIndex := gChatBubble;
+    
+  with TGUISwitch(menu.GetControl('swPlayerIndicator')) do
+    if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1;
 
   TGUIScroll(menu.GetControl('scScaleFactor')).Value := Round(g_dbg_scale - 1);
 
@@ -2711,6 +2715,12 @@ begin
       AddItem(_lc[I_MENU_GAME_CHAT_TYPE_COLOR]);
       AddItem(_lc[I_MENU_GAME_CHAT_TYPE_TEXTURE]);
     end;
+    with AddSwitch(_lc[I_MENU_GAME_PLAYER_INDICATOR]) do
+    begin
+      Name := 'swPlayerIndicator';
+      AddItem(_lc[I_MENU_YES]);
+      AddItem(_lc[I_MENU_NO]);
+    end;
     with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
     begin
       Name := 'scScaleFactor';