//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- // IGuiPageOptionsDisplay methods //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- public void OnInit(GUIBase_Layout layout) { m_GraphicEnum = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, GRAPHDETAILS_ENUM); m_AutoDetectButton = GuiBaseUtils.GetControl <GUIBase_Button>(layout, DETECTGRAPHIC_BUTTON); m_ShowHintsSwitch = GuiBaseUtils.GetControl <GUIBase_Switch>(layout, SHOWHINTS_SWITCH); m_HintLabel = GuiBaseUtils.GetControl <GUIBase_Label>(layout, HINT_LABEL); m_LanguageEnum = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, LANGUAGE_ENUM); if (m_OriginalGraphicValue < 0) { m_OriginalGraphicValue = GuiOptions.graphicDetail; } }
public static GUIBase_Enum PrepareEnum(GUIBase_Layout layout, string name, GUIBase_Enum.ChangeValueDelegate d) { GUIBase_Enum control = GetControl <GUIBase_Enum>(layout, name); if (control != null) { control.RegisterDelegate(d); } else { Debug.LogError("Can't find enum '" + name + "'"); } return(control); }
//-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- // IGuiPageOptionsDisplay methods //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- public void OnInit(GUIBase_Layout layout) { m_GraphicEnum = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, GRAPHDETAILS_ENUM); m_AutoDetectButton = GuiBaseUtils.GetControl <GUIBase_Button>(layout, DETECTGRAPHIC_BUTTON); m_ShowHintsSwitch = GuiBaseUtils.GetControl <GUIBase_Switch>(layout, SHOWHINTS_SWITCH); m_LanguageEnum = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, LANGUAGE_ENUM); m_FullscreenSwitch = GuiBaseUtils.GetControl <GUIBase_Switch>(layout, FULLSCREEN_SWITCH); m_ResolutionEnum = GuiBaseUtils.GetControl <GUIBase_Enum>(layout, RESOLUTION_ENUM); m_ResolutionLabels[0] = GuiBaseUtils.GetControl <GUIBase_Label>(layout, RESOLUTION_LABEL + 0); m_ResolutionLabels[1] = GuiBaseUtils.GetControl <GUIBase_Label>(layout, RESOLUTION_LABEL + 1); m_ResolutionLabels[2] = GuiBaseUtils.GetControl <GUIBase_Label>(layout, RESOLUTION_LABEL + 2); m_ApplyButton = GuiBaseUtils.GetControl <GUIBase_Button>(layout, APPLY_BUTTON); m_ShowHintsSwitch.SetValue(GuiOptions.showHints); }
// GUIVIEW INTERFACE protected override void OnViewInit() { #if MADFINGER_KEYBOARD_MOUSE m_ScreenLayout = GetLayout("MainOpt", "00Controls_Layout_PC"); m_KeyboardButton = GuiBaseUtils.GetControl <GUIBase_Button>(Layout, KEYBOARD_BUTTON); #else if (GamepadInputManager.Instance.IsNvidiaShield()) { m_ScreenLayout = GetLayout("MainOpt", "00Controls_Layout_Shield"); } else { m_ControlSchemeEnum = GuiBaseUtils.GetControl <GUIBase_Enum>(Layout, CONTROLS_SCHEME); m_FireButtonSize = GuiBaseUtils.GetControl <GUIBase_Slider>(Layout, FIRE_BUTTON_SIZE); m_SwitchLefthanded = GuiBaseUtils.GetControl <GUIBase_Switch>(Layout, SWITCH_LEFT_HANDED); m_CustomizeButton = GuiBaseUtils.GetControl <GUIBase_Button>(Layout, CUSTOMIZE_BUTTON); m_MogaHelpButton = GuiBaseUtils.GetControl <GUIBase_Button>(Layout, MOGA_HELP_BUTTON); } #endif m_SliderSensitivity = GuiBaseUtils.GetControl <GUIBase_Slider>(Layout, SLIDER_SENSITIVITY); m_SwitchYAxis = GuiBaseUtils.GetControl <GUIBase_Switch>(Layout, SWITCH_INVERT_Y); m_GamepadButton = GuiBaseUtils.GetControl <GUIBase_Button>(Layout, GAMEPAD_BUTTON); }