local Unlocker, Bastion = ... --! Creating the initial GUI !-- Bastion.Settings = Bastion.Interface.Category:New("Shaman") Bastion.Settings:AddSubsection("General") Bastion.Settings:Slider({ category = "bastion", var = "tickrate", name = "Engine Tickrate (milliseconds)", tooltip = "How often the Bastion Engine runs. The lower this number, the more resources Bastion will use.\n\nYou must reload for changes to take effect.", default = 100, min = 50, max = 500, step = 50, }) Bastion.Settings:Dropdown({ category = "bastion", var = "pause_key", name = "Hold-to-Pause", tooltip = "Bastion will not run while this button is held down.", default = false, options = { { "None", false }, { "Shift", "SHIFT" }, { "Control", "CTRL" }, { "Alt", "ALT" }, } }) Bastion.Settings:AddSubsection("Engine Options") Bastion.Settings:Checkbox({ category = "bastion", var = "debug", name = "Debug Mode", tooltip = "Toggles Debug Mode for the Bastion Engine.", default = false, onClick = function() Bastion.DebugMode = not Bastion.DebugMode if Bastion.DebugMode then Bastion:Debug("Debug Enabled") else Bastion:Print("Debug Disabled") end end, }) Bastion.MainBar = Bastion.Interface.Hotbar:New({ buttonCount = 3, name = "Bastion", options = Bastion.Settings }) if Bastion:IsClassic() then Bastion.MainBar:AddButton({ name = "Toggle", texture = "Interface\\ICONS\\Inv_drink_15", tooltip = "This button toggle's Bastion on and off.", toggle = true, onClick = function() Bastion.Enabled = not Bastion.Enabled if Bastion.Enabled then Bastion:Print("Enabled") else Bastion:Print("Disabled") end end, }) Bastion.MainBar:AddButton({ name = "Options", tooltip = "This button opens the Bastion Options menu.", texture = "Interface\\ICONS\\Inv_misc_gear_01", toggle = false, onClick = function() if SettingsPanel and SettingsPanel:IsVisible() then HideUIPanel(SettingsPanel) HideUIPanel(GameMenuFrame) else Settings.OpenToCategory(Bastion.MainBar.options.settings:GetID()) end end, }) else Bastion.MainBar:AddButton({ name = "Toggle", texture = "Interface\\ICONS\\ACHIEVEMENT_GUILDPERK_MRPOPULARITY", tooltip = "This button toggle's Bastion on and off.", toggle = true, onClick = function() -- if Bastion.Settings.config:Read("bastion_stimulant", true) then -- Bastion.Stimulant:Toggle() -- end Bastion.Enabled = not Bastion.Enabled if Bastion.Enabled then Bastion:Print("Enabled") else Bastion:Print("Disabled") end end, }) Bastion.MainBar:AddButton({ name = "Options", tooltip = "This button opens the Bastion Options menu.", texture = "Interface\\ICONS\\INV_Engineering_90_Gizmo", toggle = false, onClick = function() if SettingsPanel and SettingsPanel:IsVisible() then HideUIPanel(SettingsPanel) HideUIPanel(GameMenuFrame) else Settings.OpenToCategory(Bastion.MainBar.options.settings:GetID()) end end, }) end Bastion.Settings:Register()