11-07-05, 06:11 PM | #1 |
Creating a Raid GUI
greetings all,
I am a newb UI maker and will be starting to build my guilds raid UI. I would like to draw on some of your expertise in assisting me with some questions which may come up during its creation. Ive got a lot of good references to help me out with syntax and structure but those references sometimes leave a lot to be desired for the newer GUI builders like myself. The UI i am making will allow the guild GM to download an array of names into the savedvariables.lua file and upon a ui reload the UI will have these names displayed and avaialable to it in order to invite those names into a raid party. that is the very basics of what i plan on doing. The external portion of this project is already taken care of for the most part, we will be able to get an array of names saved in the lua file without to many issues, so now i get the dubious honor of creating the in game gui for it! I will use this thread over the course of development to converse with you all and hopefully get some answers, after of course ive looked at available resources already. thanks in advance for all your help! |
|
11-07-05, 06:29 PM | #2 |
ok so first question:
In the course of setting up the basic gui i found i needed to add tabbed windows, so i went in search of the best way to impliment this into the given XML/lua architecture and found (as another thread in this forum points out) an advanced tutorial on wow wiki which glasses over a bit of the syntax and implimentation of the WoW tabbing system. I attempted just to add non-functional tabs to my gui as a first round test and after a couple days of fiddlign with it i kept hitting this road block where i would attempt to load the mod in WoW and it would give me the following error: "Interface/FrameXML/UIPanelTemplates.lua:111: attempt to index a null value" i tried tracing it back to the Templates.lua file and i found the function where the error was being created: Code:
function PanelTemplates_SelectTab(tab) local name = tab:GetName(); getglobal(name.."Left"):Hide(); getglobal(name.."Middle"):Hide(); getglobal(name.."Right"):Hide(); --tab:LockHighlight(); tab:Disable(); getglobal(name.."LeftDisabled"):Show(); getglobal(name.."MiddleDisabled"):Show(); getglobal(name.."RightDisabled"):Show(); if ( GameTooltip:IsOwned(tab) ) then GameTooltip:Hide(); end end here is my current toc,xml,lua code Code:
## Interface: 1800 ## Title: Forgotten Empire Raid UI ## Notes: This UI will assist GM's with raids ## OptionalDeps: ## Dependencies: ## SavedVariables: ## SavedVariablesPerCharacter: fe_raid.xml Code:
<Ui> <Script file="fe_raid.lua"/> <!-- Frame to handle all core events --> <Frame name="fe_raid_core"> <Scripts> <OnLoad> this:RegisterEvent("VARIABLES_LOADED"); </OnLoad> <OnEvent> if (event == "VARIABLES_LOADED") then fe_raid_initialize(); end </OnEvent> </Scripts> </Frame> <Frame name="feRaidMain" frameStrata="LOW" toplevel="true" enableMouse="true" movable="true" hidden="true" parent="UIParent"> <Size> <AbsDimension x="700" y="700" /> </Size> <Anchors> <Anchor point="CENTER" /> </Anchors> <TitleRegion setAllPoints="true"/> <Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" ile="true"> <EdgeSize> <AbsValue val="50"/> </EdgeSize> <TileSize> <AbsValue val="50"/> </TileSize> <BackgroundInsets> <AbsInset left="5" right="5" top="5" bottom="5"/> </BackgroundInsets> </Backdrop> <Scripts> </Scripts> <Layers> <Layer level="BACKGROUND"> <FontString name="$parentText" inherits="GameFontNormal" text="Forgotten Empire Raid Managment"> <Anchors> <Anchor point="TOP" relativePoint="TOP" relativeTo="$parent"> <Offset> <AbsDimension x="0" y="-20" /> </Offset> </Anchor> </Anchors> </FontString> </Layer> </Layers> <Frames> <Button name="feRaidMainTabTemplate" inherits="CharacterFrameTabButtonTemplate" virtual="true"> <Scripts> <OnClick> PanelTemplates_Tab_OnClick(feRaidMain); </OnClick> </Scripts> </Button> <Button name="feRaidMainTab1" inherits="feRaidMainTabTemplate" id="1" text="Tab #1"> <Anchors> <Anchor point="BOTTOM"/> </Anchors> </Button> <Button name="feRaidMainTab2" inherits="feRaidMainTabTemplate" id="2" text="Tab #2"> <Anchors> <Anchor point="BOTTOM" relativePoint="RIGHT" relativeTo="feRaidMainTab1"/> </Anchors> </Button> </Frames> </Frame> </Ui> Code:
------------------------------------------------------------------------------- -- and the printing functions ------------------------------------------------------------------------------- function fer_debug( Message) DEFAULT_CHAT_FRAME:AddMessage(Message, 0.1, 0.1, 1); end function fer_println( Message) DEFAULT_CHAT_FRAME:AddMessage(Message, 1, 1, 1); end function fer_errln( Message) DEFAULT_CHAT_FRAME:AddMessage(Message, 1, 0.1, 0.1); end ------------------------------------------------------------------------------- function fe_raid_initialize() fer_println("Forgotten Empire Raid UI version: 0.1 has initialized."); SlashCmdList["feraid"] = fe_raid_command; SLASH_feraid1 = "/fer"; SLASH_feraid2 = "/feraid"; PanelTemplates_SetNumTabs(feRaidMain, 2); feRaidMain.selectedTab=1; PanelTemplates_UpdateTabs(feRaidMain); end function fe_raid_command(msg) -- this function handles our chat command if (msg == "show") then feRaidMain:Show(); else feRaidMain:Hide(); end end any help would be much appreciated! thank you |
|
11-07-05, 06:29 PM | #3 |
This is a nice place to start with GUI
http://fara.webeddie.com/frames/ It;s the only place to tell the truth... Ok I didn't see the code you'd posted before posting the link. I'm still leaving it up just in case, ya never know :P Last edited by shouryuu : 11-07-05 at 06:35 PM. |
|
11-07-05, 06:42 PM | #4 | |
I have a feeling that website will be VERY helpful in my endeavour thanks for the tip! |
||
WoWInterface » Developer Discussions » Lua/XML Help » Creating a Raid GUI |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|