Automatically refreshing an Image
#1
Question 
Hey guys-

Quick question on something I just can't seem to figure out. In my skin's settings window I have made a place to change a system image. When you click on the image, a custom Select dialog pops up and you then select a new image from the list. When the dialog closes however, the image doesn't change to the new one until I close the skin settings window and reenter. Is there a way to force the refresh of this image?

Any help would be greatly appreciated.

~ Zexis
bit(ten) skin (Thread) (Project Site)
metroTV skin (Thread) (Project Site)

Reply
#2
I shall assume from the lack of response that this isn't currently possible...
bit(ten) skin (Thread) (Project Site)
metroTV skin (Thread) (Project Site)

Reply
#3
No it should work, don't know why it doesn't for you. If you have e.g. this

PHP Code:
<control type="image">
    [...]
    <
texture background="true">$INFO[Skin.String(CustomImage.Path)]</texture>
</
control

and you change the string to a new image path, image should change immediately.
Image
Reply
#4
Hrm... maybe I oversimplified. Basically I am give user the ability to Pin a tile in my skin. ie- Selecting the Favourites tile sets the Skin.String 'Tile1' to the value 'Favourites'. I then have intelligence in the skin that sees the value of "Favourites" and includes "Tile_Favourites" in the Tile socket.

Code:
<include condition="Skin.String(Tile1,Favourites)">Tile_Favourites</include>

Tile_Favorites is defined in the include files as the tile icon image.

For some reason this is what doesn't load.
That said, I also have the following text which seems to work fine without reloading the screen-

Code:
<onclick condition="Skin.String(Tile1,Favourites)">ActivateWindow(Favourites)</onclick>
bit(ten) skin (Thread) (Project Site)
metroTV skin (Thread) (Project Site)

Reply
#5
Skin.String(Tile1,Favourites) is an invalid command. What you want is stringcompare(Skin.String(Tile1),Favourites). You should also know that includes are only reviewed on WindowOpen, so you need to do a skin reload or leave and re-enter the window. You need to include Tile_Favourites without a condition and show/hide it based on a visible condition.
Image
Reply
#6
Ah, so the include is the problem... thanks.

Regarding the Skin.String(Tile1,Favourites) being invalid- that is very interesting, because it actually works.
bit(ten) skin (Thread) (Project Site)
metroTV skin (Thread) (Project Site)

Reply
#7
Try setting Tile1 to something else than Favourites. I bet the condition is still true.

Edit: Really seems to work. Another thing which is not documented in the wiki. Smile

Edit2: Added it to the wiki.
Image
Reply
#8
(2013-06-26, 23:23)`Black Wrote: Try setting Tile1 to something else than Favourites. I bet the condition is still true.

Edit: Really seems to work. Another thing which is not documented in the wiki. Smile

Edit2: Added it to the wiki.

Glad I could contribute!
bit(ten) skin (Thread) (Project Site)
metroTV skin (Thread) (Project Site)

Reply

Logout Mark Read Team Forum Stats Members Help
Automatically refreshing an Image0