Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GUI = LibStub("AceGUI-3.0")
- local function GetGuiHeading(headingText)
- local h = GUI:Create("Heading")
- h:SetText(headingText)
- return h
- end
- -- Main GUI foundation
- local MFrame = GUI:Create("Frame")
- local MFrameGroup1 = GUI:Create("InlineGroup")
- local scroller = GUI:Create("ScrollFrame")
- -- Options
- local _EnableCoreLoot = GUI:Create("CheckBox")
- _EnableCoreLoot:SetLabel("Enable Addon")
- _EnableCoreLoot:SetWidth(120)
- local _TrashFoodCheckbox = GUI:Create("CheckBox")
- _TrashFoodCheckbox:SetLabel("Trash Food")
- _TrashFoodCheckbox:SetWidth(120)
- local _EnableBlacklistCheckbox = GUI:Create("CheckBox")
- _EnableBlacklistCheckbox:SetLabel("Blacklist")
- _EnableBlacklistCheckbox:SetWidth(120)
- local _EnableAutoSellCheckbox = GUI:Create("CheckBox")
- _EnableAutoSellCheckbox:SetLabel("Autosell")
- _EnableAutoSellCheckbox:SetWidth(120)
- local _EnableAutoRepair = GUI:Create("CheckBox")
- _EnableAutoRepair:SetLabel("Auto Repair")
- _EnableAutoRepair:SetWidth(120)
- local _EnableGuildRepair = GUI:Create("CheckBox")
- _EnableGuildRepair:SetLabel("Use Guild")
- _EnableGuildRepair:SetWidth(120)
- local _GreyMinGoldSlider = GUI:Create("Slider")
- _GreyMinGoldSlider:SetLabel("Greys: Min Val")
- _GreyMinGoldSlider:SetSliderValues(0, 100, 1)
- _GreyMinGoldSlider:SetWidth(120)
- local _BlacklistDropdown = GUI:Create("Dropdown")
- _BlacklistDropdown:SetMultiselect(true)
- --_BlacklistDropdown:SetText("Blacklisted Items")
- _BlacklistDropdown:SetLabel("Blacklisted Items")
- -- Configure main frame
- MFrame:SetCallback("OnClose", function(w) GUI:Release(w) end)
- MFrame:SetTitle("CoreLoot")
- MFrame:SetStatusText("Doing stuff.")
- MFrame:SetHeight(600)
- MFrame:EnableResize(false)
- -- Configure the group container
- MFrameGroup1:SetFullWidth(true)
- MFrameGroup1:SetFullHeight(true)
- MFrameGroup1:SetLayout("Fill")
- MFrameGroup1:SetHeight(500)
- -- Configure the scroller container
- scroller:SetLayout("Flow")
- -- Add children
- MFrame:AddChild(MFrameGroup1)
- MFrameGroup1:AddChild(scroller)
- -- Create Headers
- local GeneralOptionsGroup = GUI:Create("InlineGroup")
- GeneralOptionsGroup:SetFullWidth(true)
- GeneralOptionsGroup:SetTitle("General Options")
- GeneralOptionsGroup:AddChild(_EnableCoreLoot)
- local ListInteractionsGroup = GUI:Create("InlineGroup")
- ListInteractionsGroup:SetFullWidth(true)
- ListInteractionsGroup:SetTitle("List Interactions")
- ListInteractionsGroup:AddChild(_EnableBlacklistCheckbox)
- ListInteractionsGroup:AddChild(_BlacklistDropdown)
- ListInteractionsGroup:AddChild(GetGuiHeading("Autosell List"))
- ListInteractionsGroup:AddChild(_EnableAutoSellCheckbox)
- local GreyFilteringGroup = GUI:Create("InlineGroup")
- GreyFilteringGroup:SetFullWidth(true)
- GreyFilteringGroup:SetTitle("Grey Filtering")
- GreyFilteringGroup:AddChild(_GreyMinGoldSlider)
- local FoodFilteringGroup = GUI:Create("InlineGroup")
- FoodFilteringGroup:SetFullWidth(true)
- FoodFilteringGroup:SetTitle("Food Filtering")
- FoodFilteringGroup:AddChild(_TrashFoodCheckbox)
- local RepairOptionsGroup = GUI:Create("InlineGroup")
- RepairOptionsGroup:SetFullWidth(true)
- RepairOptionsGroup:SetTitle("Repair Options")
- RepairOptionsGroup:AddChild(_EnableAutoRepair)
- RepairOptionsGroup:AddChild(_EnableGuildRepair)
- scroller:AddChild(GeneralOptionsGroup)
- scroller:AddChild(ListInteractionsGroup)
- scroller:AddChild(GreyFilteringGroup)
- scroller:AddChild(FoodFilteringGroup)
- scroller:AddChild(RepairOptionsGroup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement