![]() |
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 :nana: |
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. |
Now that made some sense...thanks, will try that
robear |
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 |
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. |
| All times are GMT -5. The time now is 01:21 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI