Go to Page... |
Thread Tools | Display Modes |
06-09-11, 04:48 AM | #1 | |
WoW UI Panel / Option Templates
A gathering of all the ui panel / option / confg templates I could find.
It helps when creating config elements. frame = CreateFrame("frameType" [, "name" [, parent [, "template"]]]) http://wowprogramming.com/docs/api/CreateFrame -- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UIPanelTemplates http://wowprogramming.com/utils/xmlb...lTemplates.xml lua Code:
OptionsPanelTemplates http://wowprogramming.com/utils/xmlb...lTemplates.xml lua Code:
OptionsFrameTemplates http://wowprogramming.com/utils/xmlb...eTemplates.xml lua Code:
UIDropDownMenuTemplates http://wowprogramming.com/utils/xmlb...uTemplates.xml lua Code:
EasyMenu http://wowprogramming.com/utils/xmlb...L/EasyMenu.lua lua Code:
Font Styles http://wowprogramming.com/utils/xmlb...eOverrides.xml http://wowprogramming.com/utils/xmlb...FontStyles.xml http://wowprogramming.com/utils/xmlb...eXML/Fonts.xml Lua Code:
Tabbed Panels http://www.wowwiki.com/Creating_tabbed_windows
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-06-13 at 09:29 AM. |
||
08-09-12, 03:42 AM | #2 | |
So to sum this up. When trying to create config menus the following UI elements come in handy.
Frame A normal frame that can hold all your config elements. (buttons, checkboxes, etc.)ScrollFrame A frame that is scrollable inside.. The best example for this is the keybind setup frame.EditBox A small input element that lets you input data into a field.CheckButton / CheckBox A checkbox like input element. Basically switch values between 0 and 1.CheckButton / RadioButton A list of radiobuttons. Lets you choose one of "n" options.Slider Sliders are elements intended to allow the user to choose a value in a range.Button A clickable frame that calls an action OnClick. Blizzard provides tons of button templates.UIDropDownMenu Depending on setup this can be both a selectbox or a context menu.ColorSelect / ColorPicker In many cases you want to recolor textures. All you have to do is to call the ColorPicker and apply a callback function that handles the colors returned by the ColorPicker. Normally you have a small frame with a texture and once you change the color in the ColorPicker the texture color updates via the callback function.StatusBar Sometimes it can be helpful to display data in a statusbar. They are similar to sliders, just without the option to edit. Like a progressbar or healthbar.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 08-09-12 at 06:51 AM. |
||
02-05-13, 04:42 PM | #3 | |
I wrote myself a test addon today.
Source: http://code.google.com/p/rothui/sour...rTest/core.lua The intention of the addon to try out the listed UI components above. Button, Slider, Editbox and ScrollFrame were tested. I'm going to add the colorPicker example and an example for the dropdown list in the next update. *edit* Added the colorpicker example. http://code.google.com/p/rothui/sour...e.lua&old=1039
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-05-13 at 05:18 PM. |
||
02-06-13, 08:38 AM | #4 | |
As seen on the screenshot I had some issues working with "Tab" buttons.
I'm currently looking into it. The "OptionsFrameTabButtonTemplate" needs to be adjusted via spacer, as seen here: https://github.com/tekkub/wow-ui-sou...Frame.xml#L215 So you actually have to add another layer changing the width of the tab. The default "TabButtonTemplate" was actually quite difficult to find in use. But I found an example: https://github.com/tekkub/wow-ui-sou...rame.xml#L1167 So the size of the TabButton can be changed via OnLoad script. Lua Code:
The corresponding function can be found here: https://github.com/tekkub/wow-ui-sou...lates.lua#L142 So working with tab buttons has to include this kind of onLoad script. Not sure why the script (on the template itself is the onload script) does not work properly since as you can see the tab button has a text applied. Currently not sure. Going to debug that.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-06-13 at 09:10 AM. |
||
02-06-13, 01:20 PM | #5 | |
Test is finsihed for now. DropDown lists are implemented:
http://code.google.com/p/rothui/sour...e.lua&old=1040 Next step is to glue everything together and create an actual config panel. *edit* I started a new addon and succeeded spawing a panel. rTestPanel http://code.google.com/p/rothui/sour....0/rTestPanel/ I looked at different Blizzard frame panels und decided to use the ButtonPanelTemplate. https://github.com/tekkub/wow-ui-sou...ates.xml#L2950 The panel can be resized and has enough place for a tabbed navigation at the bottom, a tabbed navigation inside, a scrollframe and some buttons at the bottom of the panel. Next step is to bring all the general frames in place. *edit* Next step is finished. Functions for generating / updating SubFrames are in place. So are bottom tabs to actually change the SubFrames. http://code.google.com/p/rothui/sour...e.lua&old=1042 Next part is filling each subframe with some data and connecting the database (savedVariables).
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-08-13 at 09:08 PM. |
||
02-08-13, 09:10 PM | #6 | |
Made quite a huge leap today.
http://code.google.com/p/rothui/source/detail?r=1044 Creation of all panels and general panel functions is complete. Next part is connecting the database and adding some config items (slider, dropbox etc.) *edit* I'm currently reading into Lua classes. This very much needed right now since I need to create alot of instances of specific frame types. A really good writeup on that is: http://www.wowwiki.com/Object-oriented_programming http://lua-users.org/wiki/SimpleLuaClasses http://lua-users.org/wiki/LuaClassesWithMetatable A good and small example using the above behaviour is the EasyStorage class: http://www.wowinterface.com/download...syStorage.html So I'm probably doing a quick break. Need to rewrite the functions to classes/instances. I checked Tuller's code of "Classy". I do not get it yet.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-09-13 at 07:05 AM. |
||
01-31-18, 05:56 AM | #7 | |
Updated list of all templates I found in 7.3.5
Lua Code:
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 01-31-18 at 06:59 AM. |
||
01-31-18, 10:56 AM | #8 |
I have every templates extracted in my resources repo, if you can't find what you need:
https://github.com/Resike/BlizzardIn.../Templates.lua |
|
WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » WoW UI Panel / Option Templates |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|