Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: windows with different backgrounds  (Read 2629 times)

0 Members and 1 Guest are viewing this topic.

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
windows with different backgrounds
« on: April 10, 2006, 11:53:19 AM »

i have some infotexts that are displayed when you enter a new scene ....
therefore i created several windows which are completely equal except different textentities.

is it possible to create only one window and query a global variable from within the window definition to decide what textentity should be displayed ???

and if its possible how can it be done ??

greets
stucki

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: windows with different backgrounds
« Reply #1 on: April 10, 2006, 12:57:47 PM »

What do you mean by "textentities"?
Anyway, each window has a script attached. The script can modify the window's appearance at runtime. You query the individual controls using the GetControl() method, and then set their properties.
For example, if your window contains a button called "button1", use the following code to change the button's width:

var SomeButton = this.GetControl("button1");
SomeButton.Width = 100;

The same applies to static controls, their image can be changed using the SetImage() method.

var SomeStatic = this.GetControl("static1");
SomeStatic.SetImage("some_image.bmp");
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: windows with different backgrounds
« Reply #2 on: April 10, 2006, 01:56:16 PM »

as always thanks for helping so fast ....
and as always you got it to work !!!

textentities ment entities with a bitmap of a text .....

Greets
stucki
 ::rock

 

Page created in 0.037 seconds with 19 queries.