Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Lebostein on March 17, 2008, 04:21:54 PM

Title: Get widget from LoadInventoryBox()
Post by: Lebostein 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
Title: Re: Get widget from LoadInventoryBox()
Post by: Mnemonic on March 17, 2008, 04:27:02 PM
Code: WME Script
  1. var InvWin = Game.GetInventoryWindow();
  2. var SomeControl = InvWin.GetControl("control name");
  3.