Advertisement
Guest User

Untitled

a guest
Sep 7th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.46 KB | None | 0 0
  1. local GUI = LibStub("AceGUI-3.0")
  2.  
  3. local function GetGuiHeading(headingText)
  4.     local h = GUI:Create("Heading")
  5.     h:SetText(headingText)
  6.     return h
  7. end
  8.  
  9. -- Main GUI foundation
  10. local MFrame = GUI:Create("Frame")
  11. local MFrameGroup1 = GUI:Create("InlineGroup")
  12. local scroller = GUI:Create("ScrollFrame")
  13.  
  14. -- Options
  15. local _EnableCoreLoot = GUI:Create("CheckBox")
  16.       _EnableCoreLoot:SetLabel("Enable Addon")
  17.       _EnableCoreLoot:SetWidth(120)
  18.  
  19. local _TrashFoodCheckbox = GUI:Create("CheckBox")
  20.       _TrashFoodCheckbox:SetLabel("Trash Food")
  21.       _TrashFoodCheckbox:SetWidth(120)
  22.  
  23. local _EnableBlacklistCheckbox = GUI:Create("CheckBox")
  24.       _EnableBlacklistCheckbox:SetLabel("Blacklist")
  25.       _EnableBlacklistCheckbox:SetWidth(120)
  26.  
  27. local _EnableAutoSellCheckbox = GUI:Create("CheckBox")
  28.       _EnableAutoSellCheckbox:SetLabel("Autosell")
  29.       _EnableAutoSellCheckbox:SetWidth(120)
  30.  
  31. local _EnableAutoRepair = GUI:Create("CheckBox")
  32.       _EnableAutoRepair:SetLabel("Auto Repair")
  33.       _EnableAutoRepair:SetWidth(120)
  34.  
  35. local _EnableGuildRepair = GUI:Create("CheckBox")
  36.       _EnableGuildRepair:SetLabel("Use Guild")
  37.       _EnableGuildRepair:SetWidth(120)
  38.  
  39. local _GreyMinGoldSlider = GUI:Create("Slider")
  40.       _GreyMinGoldSlider:SetLabel("Greys: Min Val")
  41.       _GreyMinGoldSlider:SetSliderValues(0, 100, 1)
  42.       _GreyMinGoldSlider:SetWidth(120)
  43.  
  44. local _BlacklistDropdown = GUI:Create("Dropdown")
  45.       _BlacklistDropdown:SetMultiselect(true)
  46.       --_BlacklistDropdown:SetText("Blacklisted Items")
  47.       _BlacklistDropdown:SetLabel("Blacklisted Items")
  48.  
  49. -- Configure main frame
  50. MFrame:SetCallback("OnClose", function(w) GUI:Release(w) end)
  51. MFrame:SetTitle("CoreLoot")
  52. MFrame:SetStatusText("Doing stuff.")
  53. MFrame:SetHeight(600)
  54. MFrame:EnableResize(false)
  55. -- Configure the group container
  56. MFrameGroup1:SetFullWidth(true)
  57. MFrameGroup1:SetFullHeight(true)
  58. MFrameGroup1:SetLayout("Fill")
  59. MFrameGroup1:SetHeight(500)
  60. -- Configure the scroller container
  61. scroller:SetLayout("Flow")
  62.  
  63. -- Add children
  64. MFrame:AddChild(MFrameGroup1)
  65. MFrameGroup1:AddChild(scroller)
  66.  
  67.  
  68. -- Create Headers
  69. local GeneralOptionsGroup = GUI:Create("InlineGroup")
  70.       GeneralOptionsGroup:SetFullWidth(true)
  71.       GeneralOptionsGroup:SetTitle("General Options")
  72.       GeneralOptionsGroup:AddChild(_EnableCoreLoot)
  73.  
  74. local ListInteractionsGroup = GUI:Create("InlineGroup")
  75.       ListInteractionsGroup:SetFullWidth(true)
  76.       ListInteractionsGroup:SetTitle("List Interactions")
  77.       ListInteractionsGroup:AddChild(_EnableBlacklistCheckbox)
  78.       ListInteractionsGroup:AddChild(_BlacklistDropdown)
  79.       ListInteractionsGroup:AddChild(GetGuiHeading("Autosell List"))
  80.       ListInteractionsGroup:AddChild(_EnableAutoSellCheckbox)
  81.  
  82. local GreyFilteringGroup = GUI:Create("InlineGroup")
  83.       GreyFilteringGroup:SetFullWidth(true)
  84.       GreyFilteringGroup:SetTitle("Grey Filtering")
  85.       GreyFilteringGroup:AddChild(_GreyMinGoldSlider)
  86.  
  87. local FoodFilteringGroup = GUI:Create("InlineGroup")
  88.       FoodFilteringGroup:SetFullWidth(true)
  89.       FoodFilteringGroup:SetTitle("Food Filtering")
  90.       FoodFilteringGroup:AddChild(_TrashFoodCheckbox)
  91.  
  92. local RepairOptionsGroup = GUI:Create("InlineGroup")
  93.       RepairOptionsGroup:SetFullWidth(true)
  94.       RepairOptionsGroup:SetTitle("Repair Options")
  95.       RepairOptionsGroup:AddChild(_EnableAutoRepair)
  96.       RepairOptionsGroup:AddChild(_EnableGuildRepair)
  97.  
  98. scroller:AddChild(GeneralOptionsGroup)
  99. scroller:AddChild(ListInteractionsGroup)
  100. scroller:AddChild(GreyFilteringGroup)
  101. scroller:AddChild(FoodFilteringGroup)
  102. scroller:AddChild(RepairOptionsGroup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement