EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Background pictures (https://www.eq2interface.com/forums/showthread.php?t=7351)

RickF7666 12-08-2006 10:34 PM

Background pictures
 
The eq2ui_mainhud_achievements window has a picture in the background that is specific for each Class. So if you log in with your Paladin you get a different picture than if you log in with a Wizard. Very cool. The command appears to be :

<Image Location="10,10" Name="ClassImage" PackLocation="cfc,cfc" PackLocationProp="0001/0001,0000/0001" ScrollExtent="632,471" Size="632,471" Style="/SpecialElements.ClassBackdrop.data.templar" Visible="false"/>

Unfortunatly, simply cutting a pasting this line into another UI peice doesn't work. I think it would be really nifty to be able to have different pictures or watermarks based on things like class or deity or what ever else you could come up with. I was wondering if someone been able to do this and could they point me in the right direction.

ps. Yes I did try getting rid of the Visible="false". All that did was show the Templar image, not one for the class of my character.

gm9 12-08-2006 11:24 PM

You can find that functionality in ProfitUI's Persona window.

Zonx 12-09-2006 12:51 AM

Actually I've been providing class specific functionality with my Broker window for about a year, even before SOE.

Just pipe the DD for player class to a text object in the window, then write an OnShow script to test for each class name and do whatever you want when true.

You can do the same for Artisan class, level, any DD with a predictable value or number range.

RickF7666 12-09-2006 08:26 PM

Quote:

Originally Posted by Zonx
Actually I've been providing class specific functionality with my Broker window for about a year, even before SOE.

Just pipe the DD for player class to a text object in the window, then write an OnShow script to test for each class name and do whatever you want when true.

You can do the same for Artisan class, level, any DD with a predictable value or number range.


Ok so how do you write an onshow script? Still learning. :confused:

Landiin 12-10-2006 02:21 AM

This is the code I use for the class image on eXtreme's start button, I also use in in the group window for Arch Type images.

When the window is made visible it activates a controller object that runs the following script.

Code:

Parent.Paladin.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Paladin)
Parent.Shadowknight.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Shadowknight)
Parent.Berserker.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Berserker)
Parent.Guardian.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Guardian)
Parent.Bruiser.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Bruiser)
Parent.Monk.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Monk)
Parent.Swashbuckler.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Swashbuckler)
Parent.Brigand.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Brigand)
Parent.Dirge.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Dirge)
Parent.Troubador.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Troubador)
Parent.Ranger.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Ranger)
Parent.Assassin.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Assassin)
Parent.Wizard.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Wizard)
Parent.Warlock.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Warlock)
Parent.Illusionist.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Illusionist)
Parent.Coercer.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Coercer)
Parent.Necromancer.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Necromancer)
Parent.Conjuror.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Conjuror)
Parent.Templar.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Templar)
Parent.Inquisitor.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Inquisitor)
Parent.Warden.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Warden)
Parent.Fury.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Fury)
Parent.Mystic.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Mystic)
Parent.Defiler.Visible=(Test ? True : False) Test=(Parent.Class.LocalText==Defiler)
Activated=False

You can also do

Code:

Parent.ClassPic.Style=(Test ? /SpecialElements.ClassBackdrop.data.berserker : '') Test=(Parent.Class.LocalText==Beserker)
With the above code you can use the image style SOE uses.

thorvang 12-10-2006 08:40 AM

won't

Parent.Paladin.Visible=Parent.Class.LocalText==Paladin

do the same?

Landiin 12-10-2006 12:14 PM

Yes you could, but seems I had trouble getting it to work right and thats why I did it the way I did. But it's been a long long time ago.

But you will have to have an image for every class. Might as well use the code I posted to use the style property so you don't use more of the uses resources by adding the extra images needed. Thats what I'll be changing mine to.

gm9 12-11-2006 08:16 AM

If you just want to show an image you can make it much simpler. This is the code from my persona window. ;)
OnShow="MainPage.FindClass.Press=true"
...
<Button Name="FindClass" OnPress="Parent.ClassBackdrop.Style=&quot;/Profit.ClassBackdrops.&quot; ## Parent.Class.LocalText" />

Zonx 12-11-2006 09:05 PM

Aye, was gonna post the same as gm9. If all you're doing is a variable image...

1) Create an ImageStyle for each class name
2) Add a placeholder image to the window
3) Give the window an OnShow script that sets the placeholder's style reference to the class name.

Note: gm9's code uses concatination to point the style reference to a global namespace. If the ImageStyles are in the window itself, you won't need the concatination bit.

That's prety much how the Map window works.

The button text comparison method is useful when you need to set some other value based on class. For example, you might want the color of something to be red if class is Guardian, Green if Templar, Yellow if Ranger, etc.

If you've done some programming in the past, it might help to think of buttons as a script replacement for functions. Any time you're script is doing something more complex than setting some simple values, you probably want to call a button script.

RickF7666 12-11-2006 11:12 PM

Finally got it to work.
 
Thanks for all the help everyone. I was finally able to put all the pieces together and got what I wanted to work. I should have an update to my Persona screen out in a few days. :)


All times are GMT -5. The time now is 08:56 PM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI