02-24-12, 09:04 AM | #1 |
How to make an GUI.
|
|
02-24-12, 01:14 PM | #2 |
Here are some resources to get you started. If you have questions after reading through these, ask away.
http://www.wowpedia.org/Using_the_In...s_Addons_panel http://www.wowpedia.org/Creating_GUI...ration_options (This one uses XML, which I always stay away from, but there might be some good info in there for you.) http://wowprogramming.com/docs/widgets_hierarchy http://www.wowace.com/addons/ace3/pa...ptions-tables/ (If you decide you want to go the AceConfig route.) |
|
02-24-12, 01:26 PM | #3 | |
|
||
02-24-12, 01:51 PM | #4 |
And don't forget that you can use templates already set up for the Blizzard Options to make your job easier if you don't use AceConfig. There are also templates for fonts. You can find these by searching through the FrameXML.
|
|
02-24-12, 02:04 PM | #5 |
true that i think i'm going to stick to blizzards for now, maybe try AceConfig later
|
|
02-24-12, 02:06 PM | #6 | |
Out of curiosity, is it possible to do these entirely in LUA instead of XML?
edit: c.c Sure looks like it is going the Ace3 route, anyway to do it without Ace3, just something quick and simple? o_o
__________________
Last edited by unlimit : 02-24-12 at 02:27 PM. |
||
02-24-12, 02:27 PM | #7 |
02-24-12, 02:49 PM | #8 |
I'm working on this as well with the same system, I still need to figure out a good system though for saved variable management. I want people to be able to easily set options for all chars/their own char, but I also want to make the GUI optional so lua settings can still be used. It's not simple.
|
|
02-24-12, 02:57 PM | #9 | |
|
||
02-24-12, 03:45 PM | #10 |
If someones else wants to do this here is some code to get you started.
Good Luck! LUA Code:
|
|
02-24-12, 05:24 PM | #11 |
Great Idea
I can't wait to see this implemented into your ui. Keep up the great work.
Found this over on WoWAce. It would make a cool base for a graphical control panel. http://www.wowace.com/addons/neteaseui/ Last edited by Blazingstorm : 02-24-12 at 06:02 PM. |
|
02-24-12, 08:13 PM | #12 | ||
Full Blizzard-provided documentation is in InterfaceOptionsFrame.lua line 490: Code:
--------------------------------------------------------------------------------------------------- -- HOWTO: Add new categories of options -- -- The new Interface Options frame allows authors to place their configuration -- frames (aka "panels") alongside the panels for modifying the default UI. -- -- Adding a new panel to the Interface Options frame is a fairly straightforward process. -- Any frame can be used as a panel as long as it implements the required values and methods. -- Once a frame is ready to be used as a panel, it must be registered using the function -- InterfaceOptions_AddCategory, i.e. InterfaceOptions_AddCategory(panel) -- -- Panels can be designated as sub-categories of existing options. These panels are listed -- with smaller text, offset, and tied to parent categories. The parent categories can be expanded -- or collapsed to toggle display of their sub-categories. -- -- When players select a category of options from the Interface Options frame, the panel associated -- with that category will be anchored to the right hand side of the Interface Options frame and shown. -- -- The following members and methods are used by the Interface Options frame to display and organize panels. -- -- panel.name - string (required) -- The name of the AddOn or group of configuration options. -- This is the text that will display in the AddOn options list. -- -- panel.parent - string (optional) -- Name of the parent of the AddOn or group of configuration options. -- This identifies "panel" as the child of another category. -- If the parent category doesn't exist, "panel" will be displayed as a regular category. -- -- panel.okay - function (optional) -- This method will run when the player clicks "okay" in the Interface Options. -- -- panel.cancel - function (optional) -- This method will run when the player clicks "cancel" in the Interface Options. -- Use this to revert their changes. -- -- panel.default - function (optional) -- This method will run when the player clicks "defaults". -- Use this to revert their changes to your defaults. -- -- panel.refresh - function (optional) -- This method will run when the Interface Options frame calls its OnShow function and after defaults -- have been applied via the panel.default method described above. -- Use this to refresh your panel's UI in case settings were changed without player interaction. -- -- EXAMPLE -- Use XML to create a frame, and through its OnLoad function, make the frame a panel. -- -- MyAddOn.xml -- <Frame name="ExamplePanel"> -- <Scripts> -- <OnLoad> -- ExamplePanel_OnLoad(self); -- </OnLoad> -- </Scripts> -- </Frame> -- -- MyAddOn.lua -- function ExamplePanel_OnLoad (panel) -- panel.name = "My AddOn" -- InterfaceOptions_AddCategory(panel); -- end -- -- EXAMPLE -- Dynamically create a frame and use it as a subcategory for "My AddOn". -- -- local panel = CreateFrame("FRAME", "ExampleSubCategory"); -- panel.name = "My SubCategory"; -- panel.parent = "My AddOn"; -- -- InterfaceOptions_AddCategory(panel); -- -- EXAMPLE -- Create a frame with a control, an okay and a cancel method -- -- --[[ Create a frame to use as the panel ]] -- -- local panel = CreateFrame("FRAME", "ExamplePanel"); -- panel.name = "My AddOn"; -- -- -- [[ When the player clicks okay, set the original value to the current setting ]] -- -- panel.okay = -- function (self) -- self.originalValue = MY_VARIABLE; -- end -- -- -- [[ When the player clicks cancel, set the current setting to the original value ]] -- -- panel.cancel = -- function (self) -- MY_VARIABLE = self.originalValue; -- end -- -- -- [[ Add the panel to the Interface Options ]] -- -- InterfaceOptions_AddCategory(panel); -------------------------------------------------------------------------------------------------
__________________
WoWInterface AddOns
Last edited by SDPhantom : 02-24-12 at 08:22 PM. |
|||
02-24-12, 08:56 PM | #13 |
Last edited by Aftermathhqt : 02-24-12 at 08:58 PM. |
|
02-24-12, 09:10 PM | #14 |
Of course.
|
|
02-24-12, 09:12 PM | #15 | |
http://wowprogramming.com/docs/widgets/CheckButton http://wowprogramming.com/docs/widgets/Slider |
||
02-24-12, 09:23 PM | #16 | |
I logged into wow to try out your code, Aftermath, then Fatality popped up and I figured I may as well see what makes it's check buttons click. c.c Sooo, credit to oomp for his buttons. <_< ...and to my wife for the motivation for the screenshot. <_< lua Code:
I don't know how to make it actually work yet, but, just thought I'd share the good looking button code. c.c
__________________
Last edited by unlimit : 02-24-12 at 09:27 PM. |
||
02-25-12, 07:25 AM | #17 | ||
|
|||
02-28-12, 12:36 PM | #18 | |
More to read:
http://www.wowinterface.com/forums/s...ad.php?t=40444 http://wowprogramming.com/utils/xmlb...tionsFrame.lua http://www.wowwiki.com/Creating_GUI_...ration_options http://www.wowinterface.com/forums/s...ad.php?t=41215 http://forums.wowace.com/showthread....774#post318774 http://tain.wowinterface.com/forums/...ad.php?t=18154 http://www.wowace.com/addons/libsimp...e-options-1-0/ What's kind of interesting is the module concept that Wildbreath is using in SuperClassic. I guess some others use it too. Thus if your addon is an interface with many modules you can activate them individually.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-29-12 at 03:26 AM. |
||
02-28-12, 02:27 PM | #19 | |
Basic template for creating and calling a panel
TOC lua Code:
LUA lua Code:
Result is a blank panel. Example shows loading the DB, creating the panel/subpanel and adding a slashcmd to call the panel.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
Last edited by zork : 02-28-12 at 02:49 PM. |
||
03-02-12, 03:16 AM | #20 | |
Thanks Zork Anyways i started on a new GUI Here is it! The thing is i need to figure how to create new windows for the tabs :< LUA Code:
|
||
WoWInterface » Developer Discussions » Lua/XML Help » How to make an GUI. |
«
Previous Thread
|
Next Thread
»
|
Thread Tools | |
Display Modes | |
|
|