EQ2Interface.com
Search Downloads


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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Unread 02-26-2008, 02:47 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default How to convert decimals to integers

I wanted to follow up with a slight work-around for the problem I explained above:

Quote:
Originally Posted by Drumstix42 View Post
With the new "Top" "Height" "Left" and "Width" values, I've been messing around with some trigger events to try to change the size of other objects.
The problem is if I try to do any math, I'll get the 3 trailing decimals, ie 147.000
I tried manually putting in 147.000 into the "Height" property, and it wouldn't accept it. It just kept the previous value in there.

I guess my request is that these fields be updated to accept decimal inputs, and just trim off the trailing decimals.

*edit* My work around was to just set a nonvisable object the same size as the original, with the same pack size/location properties. (I'm changeing the size of a frame depending on certain conditions). This way I could change the size back and forth, without doing the simple math equations.
I've used my solution in my Info Center, because I needed to use simple math to properly display my drop-down list in the tree-view. I have to add several values together to position them correctly when each expands/collapses. I also had to change the scroll length each time.

While the "Top" "Height" "Left" and "Width" do not support trailing decimals, the comma delimited (IE: Location, MinimumScrollExtent) values will. It will trim off the decimals automatically. I forget where I first saw this mentioned, but I tried it for myself in the UIBuilder a while ago.

Code:
Parent.Parent.Parent.Parent.Select.MinimumScrollExtent=('146' ## ',' ## SUM) SUM=(Parent.Parent.SETTINGS.SizeCollection) + (Parent.Parent.SETTINGS.SizeTotal)
Parent.Parent.HQ.Location=('0' ## ',' ## ADD) ADD=(Parent.Parent.Collection.Top) + (Parent.Parent.Collection.Height)
Hope this helps.
__________________
"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
 



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 11:18 AM.


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