Announcement

Collapse
No announcement yet.

GFxClikWidget Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GFxClikWidget Problem

    Hi,

    So I'm trying to initialize a few buttons when my HUD is first opened, but I've run into a problem. If after my HUD is immediately opened and I try to do

    Code:
    Buttons[0] = GFxClikWidget(WireView.GetObject("button1", class'GFxClikWidget'));
    The value of Buttons[0] will be none. However if I initialize Buttons[0] at some random point later, it works fine. When I looked at the GFxProjectedUI file in the UTGame directory I noticed they do the exact same thing in the SetupArsenal() class, which is called when the inventory is opened. Without using the WidgetInitialized() function, is there a fix/work around that doesn't involve adding some arbitrary waiting time?

    #2
    This problem also refuses to let me set the text of a textInput directly after it's created. What are people doing to get around this?

    Comment


      #3
      You can't assign an object to a variable if it does not yet exist on the stage. This is why WidgetInitialized() is typically used.

      Comment


        #4
        Oh ok. So what if I call AttachMovie("NewPanel", "NewPanel"$I); a bunch of times, where the NewPanel movie contains 1 textinput. Will the textinput widgets be initialized in the order that they were attached?

        Comment


          #5
          [Solved] Yes, this is the case. However it didn't matter anyways, thanks Matt.

          Comment

          Working...
          X