You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.6 KiB
56 lines
1.6 KiB
MoveIt.GUI = {}
|
|
|
|
function MoveIt.GUI:StatusMessage(message)
|
|
self.windowMain:SetStatusText(message)
|
|
end
|
|
|
|
function MoveIt.GUI:Create()
|
|
|
|
if not self.guiCreated then
|
|
|
|
self.optionsTabs =
|
|
{
|
|
{ text = "Options", value = "Options" },
|
|
{ text = "Profile", value = "Profile" }
|
|
}
|
|
|
|
local function OnTabSelected(container, event, group)
|
|
container:ReleaseChildren()
|
|
if group == "Options" then self.Options:Create(container) elseif
|
|
group == "Profile" then self.Profile:Create(container) end
|
|
end
|
|
|
|
self.onChangeSetting = function(widget, event, value) self:OnChangeSetting() end
|
|
|
|
self.windowMain = AceGUI:Create("Frame")
|
|
self.windowMain:SetTitle("MoveIt " .. MoveIt.version)
|
|
self.windowMain:SetLayout("Fill")
|
|
self.windowMain:SetWidth("800")
|
|
self.windowMain:SetHeight("677")
|
|
self.windowMain:SetCallback("OnClose", function(widget)
|
|
self.guiCreated = false
|
|
MoveIt.Overlay:UpdateOverlay()
|
|
self.windowMain:ReleaseChildren()
|
|
self.Options.selectedFrame = nil
|
|
end)
|
|
|
|
self.tabgroupOptions = AceGUI:Create("TabGroup")
|
|
self.tabgroupOptions:SetTabs(self.optionsTabs)
|
|
self.tabgroupOptions:SetLayout("Flow")
|
|
self.tabgroupOptions:SetCallback("OnGroupSelected", OnTabSelected)
|
|
self.windowMain:AddChild(self.tabgroupOptions)
|
|
|
|
self.tabgroupOptions:SelectTab("Options")
|
|
|
|
self.guiCreated = true
|
|
end
|
|
|
|
end
|
|
|
|
function MoveIt.GUI:CreateDivider(container)
|
|
|
|
local heading = AceGUI:Create("Heading")
|
|
heading:SetRelativeWidth(1)
|
|
container:AddChild(heading)
|
|
|
|
end
|