Sie sind nicht angemeldet.

VVZen

Anfänger

  • »VVZen« ist der Autor dieses Themas

Beiträge: 26

Beruf: Freelance 2d-3d Artist

  • Nachricht senden

1

Donnerstag, 8. Oktober 2015, 11:07

Change design_bgcolor at runtime

Hi folks!
It is possible to change the skin_settings.design_bgcolor at runtime?
I'm trying with:

Quellcode

1
2
3
4
5
<action name="load_italyart_scene">
    loadscene(%1,null, MERGE, LIGHTBLEND(1.0, 0xFFFFFF, 2.0, linear));
    set(skin_settings.design_bgcolor, 0xE93730);
    trace('0xE93730');
  </action>


Thanks,

Namastè.
VVZen - 3d generalist getting into the VR world

yaskebasi.it

2

Mittwoch, 14. Oktober 2015, 13:55

I would say this way: Yes, it is possible to change skin_settings.design_bgcolor when ever you want but the question is what you want to achieve with it. This is like changing any other variable set(a,123);
If you want that some element (layer/hotspot) that is already using "old" value be updated I think you have to set their attributes again with new values. Maybe updatescreen() or invalidatescreen() could do this too, not sure. Check this.
Umalo

3

Freitag, 16. Oktober 2015, 09:47

Hi,

in vtourskin.xml the value of skin_settings.design_bgcolor will be evaluated a xml-parsing time via the special get: and calc: attribute values.

That means during the xml parsing the values will copied/calculated, but after xml parsing at run-time there is no relation anymore between the design_bgcolor variable and color values of the other elements.

You could write a kind of 'update_bgcolor' action and update there all elements that should use that color.

Best regards,
Klaus