def OpenGameplayOptionsWindow(): """Open gameplay options window""" global HelpTextArea #GemRB.GetView("SUB_WIN", 0).Close() #gameplayoptions Window = GemRB.LoadWindow(8, "GUIOPT") Window.AddAlias("SUB_WIN", 0) Window.SetFlags(WF_BORDERLESS, OP_OR) HelpTextArea = GUIOPTControls.OptHelpText('GameplayOptions', Window, 40, 18042) GUIOPTControls.OptDone(CloseGameplayOptionsWindow, Window, 7) GUIOPTControls.OptCancel(CloseGameplayOptionsWindow, Window, 20) GUIOPTControls.OptSlider(18042, 18017, HelpTextArea, Window, 1, 21, 17143, 'Tooltips', DisplayHelpTooltipDelay, 10) GUIOPTControls.OptSlider(18042, 18018, HelpTextArea, Window, 2, 22, 17144, 'Mouse Scroll Speed', DisplayHelpMouseScrollingSpeed, 5) GUIOPTControls.OptSlider(18042, 18019, HelpTextArea, Window, 3, 23, 17145, 'Keyboard Scroll Speed', None, 5) GUIOPTControls.OptSlider(18042, 18020, HelpTextArea, Window, 12, 24, 13911, 'Difficulty Level', None, 0) if GemRB.GetVar("Nightmare Mode") == 1: # lock the slider Slider = Window.GetControl(12) Slider.SetDisabled(True) GUIOPTControls.OptCheckbox(18042, 18021, HelpTextArea, Window, 14, 25, 13697, 'Always Dither') GUIOPTControls.OptCheckbox(18042, 18023, HelpTextArea, Window, 19, 27, 17182, 'Gore') GUIOPTControls.OptCheckbox(18042, 11797, HelpTextArea, Window, 42, 44, 11795, 'Infravision') GUIOPTControls.OptCheckbox(18042, 20619, HelpTextArea, Window, 47, 46, 20618, 'Weather') if GameCheck.IsBG2(): GUIOPTControls.OptCheckbox(18042, 2242, HelpTextArea, Window, 50, 48, 2241, 'Heal Party on Rest') elif GameCheck.IsIWD2() or GameCheck.IsIWD1(): GUIOPTControls.OptCheckbox(18042, 15136, HelpTextArea, Window, 50, 49, 17378, 'Maximum HP') GUIOPTControls.OptButton(OpenFeedbackOptionsWindow, Window, 5, 17163) GUIOPTControls.OptButton(OpenAutopauseOptionsWindow, Window, 6, 17166) if GameCheck.IsBG2(): GUIOPTControls.OptButton(OpenHotkeyOptionsWindow, Window, 51, 816) Window.ShowModal(MODAL_SHADOW_GRAY) return
def OpenGameplayOptionsWindow(): """Open gameplay options window""" global SubOptionsWindow, HelpTextArea Window = SubOptionsWindow CloseSubOptionsWindow() #gameplayoptions Window = GemRB.LoadWindow(8) HelpTextArea = GUIOPTControls.OptHelpText('GameplayOptions', Window, 40, 18042) GUIOPTControls.OptDone(CloseGameplayOptionsWindow, Window, 7) GUIOPTControls.OptCancel(CloseGameplayOptionsWindow, Window, 20) GUIOPTControls.OptSlider(18042, 18017, HelpTextArea, Window, 1, 21, 17143, 'Tooltips', DisplayHelpTooltipDelay, TOOLTIP_DELAY_FACTOR) GUIOPTControls.OptSlider(18042, 18018, HelpTextArea, Window, 2, 22, 17144, 'Mouse Scroll Speed', DisplayHelpMouseScrollingSpeed, 5) GUIOPTControls.OptSlider(18042, 18019, HelpTextArea, Window, 3, 23, 17145, 'Keyboard Scroll Speed', None, 5) GUIOPTControls.OptSlider(18042, 18020, HelpTextArea, Window, 12, 24, 13911, 'Difficulty Level', None, 0) GUIOPTControls.OptCheckbox(18042, 18021, HelpTextArea, Window, 14, 25, 13697, 'Always Dither') GUIOPTControls.OptCheckbox(18042, 18023, HelpTextArea, Window, 19, 27, 17182, 'Gore') GUIOPTControls.OptCheckbox(18042, 11797, HelpTextArea, Window, 42, 44, 11795, 'Infravision') GUIOPTControls.OptCheckbox(18042, 20619, HelpTextArea, Window, 47, 46, 20618, 'Weather') if GameCheck.IsBG2(): GUIOPTControls.OptCheckbox(18042, 2242, HelpTextArea, Window, 50, 48, 2241, 'Heal Party on Rest') elif GameCheck.IsIWD2(): GUIOPTControls.OptCheckbox(18042, 15136, HelpTextArea, Window, 50, 49, 17378, 'Maximum HP') GUIOPTControls.OptButton(OpenFeedbackOptionsWindow, Window, 5, 17163) GUIOPTControls.OptButton(OpenAutopauseOptionsWindow, Window, 6, 17166) if GameCheck.IsBG2(): GUIOPTControls.OptButton(OpenHotkeyOptionsWindow, Window, 51, 816) SubOptionsWindow = Window Window.ShowModal(MODAL_SHADOW_GRAY) return
def OpenAudioOptionsWindow(): """Open audio options window""" global SubOptionsWindow, HelpTextArea Window = SubOptionsWindow CloseSubOptionsWindow() Window = GemRB.LoadWindow(7) HelpTextArea = GUIOPTControls.OptHelpText('AudioOptions', Window, 14, 18040) GUIOPTControls.OptDone(CloseAudioOptionsWindow, Window, 24) GUIOPTControls.OptCancel(CloseAudioOptionsWindow, Window, 25) GUIOPTControls.OptButton(OpenCharacterSoundsWindow, Window, 13, 17778) GUIOPTControls.OptSlider(18040, 18008, HelpTextArea, Window, 1, 16, 16514, 'Volume Ambients', DisplayHelpAmbientVolume, 10) GUIOPTControls.OptSlider(18040, 18009, HelpTextArea, Window, 2, 17, 16515, 'Volume SFX', None, 10) GUIOPTControls.OptSlider(18040, 18010, HelpTextArea, Window, 3, 18, 16512, 'Volume Voices', None, 10) GUIOPTControls.OptSlider(18040, 18011, HelpTextArea, Window, 4, 19, 16511, 'Volume Music', DisplayHelpMusicVolume, 10) GUIOPTControls.OptSlider(18040, 18012, HelpTextArea, Window, 22, 20, 16546, 'Volume Movie', None, 10) GUIOPTControls.OptCheckbox(18040, 18022, HelpTextArea, Window, 26, 28, 20689, 'Environmental Audio') SubOptionsWindow = Window Window.ShowModal(MODAL_SHADOW_GRAY) return
def OpenAudioOptionsWindow(): """Open audio options window""" global HelpTextArea #GemRB.GetView("SUB_WIN", 0).Close() Window = GemRB.LoadWindow(7, "GUIOPT") Window.AddAlias("SUB_WIN", 0) Window.SetFlags(WF_BORDERLESS, OP_OR) HelpTextArea = GUIOPTControls.OptHelpText('AudioOptions', Window, 14, 18040) GUIOPTControls.OptDone(CloseAudioOptionsWindow, Window, 24) GUIOPTControls.OptCancel(CloseAudioOptionsWindow, Window, 25) GUIOPTControls.OptButton(OpenCharacterSoundsWindow, Window, 13, 17778) GUIOPTControls.OptSlider(18040, 18008, HelpTextArea, Window, 1, 16, 16514, 'Volume Ambients', DisplayHelpAmbientVolume, 10) GUIOPTControls.OptSlider(18040, 18009, HelpTextArea, Window, 2, 17, 16515, 'Volume SFX', None, 10) GUIOPTControls.OptSlider(18040, 18010, HelpTextArea, Window, 3, 18, 16512, 'Volume Voices', None, 10) GUIOPTControls.OptSlider(18040, 18011, HelpTextArea, Window, 4, 19, 16511, 'Volume Music', DisplayHelpMusicVolume, 10) GUIOPTControls.OptSlider(18040, 18012, HelpTextArea, Window, 22, 20, 16546, 'Volume Movie', None, 10) GUIOPTControls.OptCheckbox(18040, 18022, HelpTextArea, Window, 26, 28, 20689, 'Environmental Audio') Window.ShowModal(MODAL_SHADOW_GRAY) return