Minion Beta! - Help us test our new AddOn updater. Get it now!
(2 Kb)
Updated: 06-22-14 07:04 PM
File Info
Updated:06-22-14 07:04 PM
Created:06-22-14 07:04 PM


Version: 1
by: TULOA [More]

IOLib - Interface Options Library

This library contains a few of the most commonly used Interface Options Elements used to setup a panel in the Interface Options area of the Game Menu.

Currently Available:

  • Editbox
  • Slider
  • CheckButton
  • Button
  • Dropdown
  • Label
Not Finished:
  • ScrollFrame
More to come as needed or requested in the future.

Usage: Note: <name> and what you name the variable holding the element should be the same. It may not be required but is buggy without it.
Editbox: IOLib_CreateEditBox(parent, name, width, height, Anchor, PosX, PosY, BackDrop)
EditboxTest = IOLib_CreateEditBox(Test.panel, "EditboxTest", 100, 20,"TOPLEFT", -45, 200, nil)
--SetScript Lines
Slider: IOLib_CreateSlider(parent, name, text, DefVal, LowVal, HighVal, step, Anchor, PosX, PosY)
SliderTest = IOLib_CreateSlider(Test.childpanel, "SliderTest", "Test Slider", <SomeDefaultValue>, 1, 7, 1, "TOPLEFT", -70, 40)
--SetScript Lines
CheckButton: IOLib_CreateCheckButton(_parent, name, text, tooltiptext, Anchor, PosX, PosY)
ChkBtnTest = IOLib_CreateCheckButton(Test.childpanel, "ChkBtnTest", nil, nil, "TOPLEFT", -30, 10)
--SetScript Lines
Button: IOLib_CreateButton(_parent, name, text, width, height, Anchor, PosX, PosY)
BtnTest = IOLib_CreateButton(Test.panel, "BtnTest", "Test Button",  100, 30, "TOPLEFT", 0, 400)
--SetScript Lines

Now for the interesting one...:
Dropdown Menu: IOLib_CreateDropDown(parent, name, title, width, anchor, posX, posY, menuList, OnClick, DefVal)
--TestMenu List of Options. Setup {<Name of Option>, <hasArrow?>, <menuList with same setup>}
--The setup is able to be infinitely nested down until there are no more true set <hasArrow?> entries.
testMenuList = {{"Greetings", true, {{"Hi", true, {{"H", true, {{"Amazing", false, nil}}},
                                                   {"i", false, nil}}},
                                     {"Hello", false, nil}}},
                {"Farewells", true, {{"Bye", false, nil},
                                     {"Goodbye", false, nil}}},
                {"Test", false, nil}}
--The above is a sample of a deep nesting Dropdown Menulist Table.
--The actual creation code:
DrpDwnTest = IOLib_CreateDropDown(Test.panel, "DrpDwnTest", "Test", 100, "TOPLEFT", -40, 400, testMenuList, <OnClick Function>, <SomeDefaultValue>)

There have been no comments posted to this file.
Be the first to add one.

Category Jump: