EQ2Interface.com
Search Downloads


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

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 07-15-2006, 03:26 AM
robear0001 robear0001 is offline
A Young Mystail Rat
 
Join Date: Apr 2006
Server: Antonia Bayle
Posts: 2
Default Images Affected by DynamicData

I am going to admit right away that though I have been programming for years and I have been following this site since I started playing EQ2. I have modified some UI's but have hit a brick wall.

Here is my wall. I know how to display the gamedata.self.experienceyadayada as text. I also know how to make an image display and to set which rect area of my image is displayed in the image window. I know you can scroll it, but have not figured out how to scroll the main image file through the rect

Is there a way to alter an images SourceRect based on the value of the dynamicdata. I hate being a noob... kind of like-

dd=dynamicdata

if dd<10 then sourcerect="0,0,20,30"
if dd<20 && dd>10 then sourcerect="20,0,40,30"

etc...

I know this isn't xml conditions, thats my problem, how would you code that to adjust the images position based on one of the dynamic data variables

Thanks in advance

Robear
Reply With Quote
  #2  
Unread 07-16-2006, 04:09 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

if dd<10 then sourcerect="0,0,20,30"

ONWhatever="image.Sourcerect=(ddCheck ? 0,0,10,10 : 0,0,20,20) ddCheck=dd<10"

if dd<20 && dd>10 then sourcerect="20,0,40,30"

OnWhatever="Image.Sourcerect=(ddCheck ? 0,0,10,10 : 0,0,20,20) ddCheck=(dd1 && dd2) dd1=dd<20 dd2=dd>10"

Keep in mind that eq2 executes script top to bottom, right to left. I didnt' test this but it should work.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #3  
Unread 07-17-2006, 01:34 AM
robear0001 robear0001 is offline
A Young Mystail Rat
 
Join Date: Apr 2006
Server: Antonia Bayle
Posts: 2
Default

Now that made some sense...thanks, will try that

robear
Reply With Quote
  #4  
Unread 07-17-2006, 02:41 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

For the operators you can use in the XML files, also make sure to check out this excellent sticky:

http://www.eq2interface.com/forums/s...ead.php?t=5406
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #5  
Unread 07-17-2006, 06:16 AM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Fairly sure you can't alter the source rect of an image. The EQ2 client doesn't actually load the source image, just the individual slices defined by various sourcerects. You may be able to reduce the sourcerect, but I doubt the client will pull new pixels from the source image after the slice has been loaded.

One option is to define the sourcerect large enough to include all the required imagery. Place the image inside a page container, then manipulate the image location and page size to clip the image as needed. This option could potentially save some memory but may require a bit more programming and processing.

Another option is to define multiple imageStyles, then swap imageStyles and sizes as needed. The Map window uses this method to change maps. Potentially requires more memory if you're image slices overlap the same pixels in the source image. A bit less programming and processing than the first option.

Yet another option is to define multiple imageStyles, stack multiple images each referencing a different imageStyle, and hide/show as needed. This is how the Targeting window handles mob tier indicators. Probably requires a bit more memory than the first option. Probably the easiest to program since the images are pre possitioned and simply need to be hidden/shown.
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 02:25 AM.


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