Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Window static objects  (Read 3776 times)

0 Members and 1 Guest are viewing this topic.

Scout

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 29
  • Currently in development...
    • View Profile
    • Juniper Games
Window static objects
« on: December 01, 2008, 08:52:55 PM »

I have a window that I load and at the point of loading I change the text display of one static object and the image display of another static object.  Except that the image doesn't change but the text does, which confuses me, somewhat.

Code: [Select]
var ShowInfo = Game.LoadWindow("interface\system\InfoWin.window");
var InfoImage = ShowInfo.GetControl("ImageDisplay");
InfoImage.Image = "interface\Info_Stuff\Info_test.png";
var InfoText = ShowInfo.GetControl("TextDisplay");
InfoText.Text = "This is a test of the info window text.";
ShowInfo.Center();
ShowInfo.GoSystemExclusive();
Game.UnloadObject(ShowInfo);

Can someone please tell me why the text works and not the image?
Logged

maze

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 59
  • Good news
    • View Profile
Re: Window static objects
« Reply #1 on: December 01, 2008, 09:19:00 PM »

InfoImage.Image = ("interface\Info_Stuff\Info_test.png" );

This should do the trick
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Window static objects
« Reply #2 on: December 01, 2008, 09:33:06 PM »

Almost :)

InfoImage.SetImage("interface\Info_Stuff\Info_test.png");
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Scout

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 29
  • Currently in development...
    • View Profile
    • Juniper Games
Re: Window static objects
« Reply #3 on: December 01, 2008, 09:40:11 PM »

I was just about to reply that maze's suggestion didn't work.

Many thanks for that, Jan.
Logged

maze

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 59
  • Good news
    • View Profile
Re: Window static objects
« Reply #4 on: December 02, 2008, 03:50:05 PM »

ohh, shame on me
Logged

Scout

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 29
  • Currently in development...
    • View Profile
    • Juniper Games
Re: Window static objects
« Reply #5 on: December 02, 2008, 03:58:39 PM »

But I appreciate you trying to help. ::thumbup
Logged
 

Page created in 0.036 seconds with 23 queries.