Thread Tools Display Modes
11-07-05, 06:11 PM   #1
miranoff
A Murloc Raider
Join Date: Oct 2005
Posts: 5
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!
  Reply With Quote
11-07-05, 06:29 PM   #2
miranoff
A Murloc Raider
Join Date: Oct 2005
Posts: 5
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
local name = tab:GetName(); is the offending line (i think)

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
im kind of at a loss as to what it could be, ive attempted to fiddle around with the xml and lua a bit to see what woudl happen but it only made it worse as i made changes. As it stands now the UI loads and i can bring up the main frame but it doesnt have tabs on it.

any help would be much appreciated!

thank you
  Reply With Quote
11-07-05, 06:29 PM   #3
shouryuu
A Chromatic Dragonspawn
 
shouryuu's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 150
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.
  Reply With Quote
11-07-05, 06:42 PM   #4
miranoff
A Murloc Raider
Join Date: Oct 2005
Posts: 5
Originally Posted by shouryuu
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
ahh yea, i have that up in firefox as well

I have a feeling that website will be VERY helpful in my endeavour

thanks for the tip!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Creating a Raid GUI

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off