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: Get widget from LoadInventoryBox()  (Read 2518 times)

0 Members and 1 Guest are viewing this topic.

Lebostein

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
    • View Profile
Get widget from LoadInventoryBox()
« on: March 17, 2008, 04:21:54 PM »

Hi,

I want to update a text object (static control with name "line") in my Inventory Box. How I can get the ID of this object? I have tested the follow things, but without success:

Code: [Select]
var gui = Game.LoadInventoryBox("interface\inventory.def");
global gui_line = gui.GetControl("line");

Code: [Select]
var gui = Game.LoadInventoryBox("interface\inventory.def");
global gui_line = gui.GetWidget("line");

Must I extract the ID from included window first?

Thanks
« Last Edit: March 17, 2008, 04:25:04 PM by Lebostein »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Get widget from LoadInventoryBox()
« Reply #1 on: March 17, 2008, 04:27:02 PM »

Code: WME Script
  1. var InvWin = Game.GetInventoryWindow();
  2. var SomeControl = InvWin.GetControl("control name");
  3.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.111 seconds with 24 queries.