EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 11-25-2010, 11:07 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default Level: None

Is there a way if the lvl is None to not have it parse?

Like if the lvl is a lvl number show, if the lvl is none dont show it?

Thanks,
Draven
Reply With Quote
  #2  
Unread 11-26-2010, 12:11 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Make that element invisible, and make a new text element exactly like it. Don't use the dynamicdata for the next text however.

In the invisible element you would add a OnTextChanged property and do something like this:

Code:
sCurrentLevel=Text
bCheck=(Text == 'None')
sResult=(bCheck ? ' ' : sCurrentLevel)
Parent.NewLevelDisplay.text=sResult
where NewLevelDisplay is your new, visible text element. That should make it show the level as long as it's not equal to "None".
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #3  
Unread 11-26-2010, 01:06 AM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

Quote:
Originally Posted by Drumstix42 View Post
Make that element invisible, and make a new text element exactly like it. Don't use the dynamicdata for the next text however.

In the invisible element you would add a OnTextChanged property and do something like this:

Code:
sCurrentLevel=Text
bCheck=(Text == 'None')
sResult=(bCheck ? ' ' : sCurrentLevel)
Parent.NewLevelDisplay.text=sResult
where NewLevelDisplay is your new, visible text element. That should make it show the level as long as it's not equal to "None".
This is my actual lvl item:
Code:
<Text Activated="true" DynamicData="/GameData.Target.Level" Font="/TextStyles.SuperLarge.SuperLargeStyle" Location="12,42" MaxLines="1" Name="Level" OnTextChanged="sCurrentLevel=Text bCheck=(Text == 'None') sResult=(bCheck ? ' ' : sCurrentLevel) Parent.LevelTextObject.text=sResult" ScrollExtent="32,40" Size="32,32" TextAlignment="Center" TruncateElipsis="false" Visible="false">60</Text>
This is my NewTextObject:
Code:
<Text Activated="true" Font="/TextStyles.SuperLarge.SuperLargeStyle" Location="12,42" MaxLines="1" Name="LevelTextObject" ScrollExtent="32,40" Size="32,32" TextAlignment="Center" TruncateElipsis="false" Visible="false">60</Text>
Its still showing the None as a level. None isnt a level lol.

Thanks,
Draven

Last edited by Draven_Caine : 11-26-2010 at 01:15 AM. Reason: Fixed an error that the web created.
Reply With Quote
  #4  
Unread 11-26-2010, 09:59 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

You're making a mistake of thinking that the script interpreter reads separated commands left to right. It reads things from right to left(so that expressions are evaluated before going into a variable) and then from the top line to the bottom.

Example 1:
var=1
var=2
var=3
var=4

Result is that var == 4

Example 2:
var=1 var=2 var=3 var=4
Result is that var == 1

Example 3:
var=1&#xD;&#xA;var=2&#xD;&#xA;var=3&#xD;&#xA;var=4
Result is that var == 4

Example 3 works as a single line because "&#xD;&#xA;" are XML entities for "\r\n". (A carriage return and a new line)
Reply With Quote
  #5  
Unread 11-26-2010, 02:49 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

You lost me there, Is this possible if so where is my mistake?

Thanks,
Draven
Reply With Quote
  #6  
Unread 11-26-2010, 07:50 PM
Draven_Caine's Avatar
Draven_Caine Draven_Caine is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Oct 2009
Server: Unrest
Posts: 155
Default

Ok, i have it working kinda. None doesnt appear the first time a target something, but any other time it does. SO if i reload my ui and clik a node forsay, than no lvl number appears. If i target it a second time none reappears ... sigh ... so close

Any idea why it would ignore the "OnTextChanged" the 2nd, 3rd, ect times?

Thanks,
Draven

Last edited by Draven_Caine : 11-26-2010 at 08:40 PM.
Reply With Quote
Reply



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
Forum Jump


All times are GMT -5. The time now is 01:31 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI