diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 3a6f0e7d6efb7895642f1cd3f86bf1b5522e1354..6cbc68e5d96ab006b8fab7f6d7d8e8bb1b682d92 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
{$INCLUDE ../nogl/noGLuses.inc}
g_gui, g_textures, e_graphics, g_main, g_window, g_game, g_map,
g_basic, g_console, g_sound, g_gfx, g_player, g_options, g_weapons,
- e_log, SysUtils, CONFIG, g_playermodel, DateUtils, sdl2,
+ e_log, SysUtils, CONFIG, g_playermodel, DateUtils,
MAPDEF, Math, g_saveload,
e_texture, g_language,
g_net, g_netmsg, g_netmaster, g_items, e_input, g_touch,
- utils, wadreader;
+ utils, wadreader, g_system;
type TYNCallback = procedure (yes:Boolean);
ovs := gVSync;
gVSync := TGUISwitch(menu.GetControl('swVSync')).ItemIndex = 0;
- if (ovs <> gVSync) then g_SetVSync(gVSync);
+ if (ovs <> gVSync) then
+ sys_EnableVSync(gVSync);
gTextureFilter := TGUISwitch(menu.GetControl('swTextureFilter')).ItemIndex = 0;
glLegacyNPOT := not (TGUISwitch(menu.GetControl('swLegacyNPOT')).ItemIndex = 0);
gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0;
gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex;
gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex;
+ gPlayerIndicatorStyle := TGUISwitch(menu.GetControl('swPlayerIndicatorStyle')).ItemIndex;
if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then
begin
TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value;
with TGUISwitch(menu.GetControl('swPlayerIndicator')) do
ItemIndex := gPlayerIndicator;
+ with TGUISwitch(menu.GetControl('swPlayerIndicatorStyle')) do
+ ItemIndex := gPlayerIndicatorStyle;
+
TempScale := Round(g_dbg_scale - 1);
TGUIScroll(menu.GetControl('scScaleFactor')).Value := TempScale;
slWaitStr := _lc[I_NET_SLIST_WAIT];
g_Game_Draw;
- ReDrawWindow;
+ sys_Repaint;
slReturnPressed := True;
if g_Net_Slist_Fetch(slCurrent) then
var
menu: TGUIMenu;
list: SSArray;
- SR: DWORD;
begin
menu := TGUIMenu(g_GUI_GetWindow('OptionsVideoResMenu').GetControl('mOptionsVideoResMenu'));
with TGUIListBox(menu.GetControl('lsResolution')) do
begin
- list := GetDisplayModes(gBPP, SR);
-
+ list := sys_GetDispalyModes(gBPP);
if list <> nil then
- begin
- Items := list;
- ItemIndex := SR;
- end
+ begin
+ Items := list;
+ ItemIndex := Length(list)
+ end
else
- Clear();
+ begin
+ Clear
+ end
end;
with TGUISwitch(menu.GetControl('swFullScreen')) do
AddItem(_lc[I_MENU_GAME_INDICATOR_OWN]);
AddItem(_lc[I_MENU_GAME_INDICATOR_ALL]);
end;
+ with AddSwitch(_lc[I_MENU_GAME_INDICATOR_STYLE]) do
+ begin
+ Name := 'swPlayerIndicatorStyle';
+ AddItem(_lc[I_MENU_GAME_INDICATOR_ARROW]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_NAME]);
+ end;
with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
begin
Name := 'scScaleFactor';
begin
Name := 'mOptionsControlsJoystickMenu';
for i := 0 to e_MaxJoys - 1 do
- if e_JoystickAvailable[i] then
- with AddScroll(Format(_lc[I_MENU_CONTROL_DEADZONE], [i + 1])) do
- begin
- Name := 'scDeadzone' + IntToStr(i);
- Max := 20
- end
+ with AddScroll(Format(_lc[I_MENU_CONTROL_DEADZONE], [i + 1])) do
+ begin
+ Name := 'scDeadzone' + IntToStr(i);
+ Max := 20
+ end
end;
Menu.DefControl := 'mOptionsControlsJoystickMenu';
g_GUI_AddWindow(Menu);