How do I UI?

VikingKing

Active Member
So bare with me a little, you have to understand that while I don't believe myself to be stupid, I don't have any experience scripting, writing html, working with xml, etc. I learn quickly by looking at others' work, for example I am revamping Pygar's templar script to be a bit more friendly to the small group templar, however, I want to do some ground up learning and can't find a lot of resources..

Is there a basic instruction somewhere on how to create / use UI elements? I don't want to do anything amazingly complicated, but something that covers how to interact scripts with the XML for the UI element, using things like fill in the blank strings, drop down boxes (with 3-4 options) and check boxes would fit the bill.

I've tried pulling it out of some of the existing scripts, but its in the middle of so much other stuff it hurts my brain.

I'm not looking for someone to hold my hand, but a nudge in the right direction would be appreciated.
 

mycroft

Script Author: MyPrices
It's quite simple really...but there are a lot of options...

Checking out other peoples work is how I learnt it...even now I have to go back to the wiki and remind myself of the commands every now and again...

Your best bet is to try each element type and if you get stuck ask specific questions in here , otherwise there is a lot to try and explain...

For instance...if someone asked how do I tick or untick a checkbox in a UI based on a variable in a script...

I'd reply.


Code:
; When the UI is loaded..
<OnLoad>
; if the variable MatchLowPrice in the myprices script is TRUE
if ${Script[myprices].VariableScope.MatchLowPrice}
	{
; check the MatchLowPrice named checkbox in the Sell Tab within the GUITabs area within the Myprices UI
	UIElement[MatchLowPrice@Sell@GUITabs@MyPrices]:SetChecked
	}
	else
	{
; Otherwise Uncheck it
	UIElement[MatchLowPrice@Sell@GUITabs@MyPrices]:UnsetChecked
	}
</OnLoad>

Otherwise I wouldn't know where to start explaining it all.
 

Amadeus

The Maestro
Staff member
There are extensive examples in /Scripts/EQ2Craft/UI/CraftGUI_Beta.xml and /Scripts/EQ2Bot/UI/EQ2Bot.xml, /Scripts/EQ2Bot/UI/EQ2BotExtras.xml ...etc

Everything you need to know is there ..and you can even play around with those files and see the results in action by running the script.
 
Top Bottom