Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 19th Mar 2025 at 10:54 AM
How do I add a TextInput in UI modding?
Does anyone know how to work with sprite frames to create a new variable in an ActionScript class?
I've decompiled the TMEX Searchable Pose Player mod to explore how to add a new TextInput in the GameUI, but it's not working with my own pickers.gfx file.

I'm trying to add this script to my own file and insert a PlaceObject3 tag with the name 'mcTextInput' into the sprite, as shown in the screenshot.
Code:
package widgets.Pickers.controls
{
   //...
   import scaleform.clik.controls.TextInput;
   [Embed(source="/_assets/assets.swf", symbol="symbol206")]
   public class GUIPicker extends GUIPickerBase
   {
      //...
      public var mcTextInput:TextInput;

      override protected function ConfigUI() : void
      {
         super.ConfigUI();
         this.txtSubTitle.visible = false;
         this.mOrigTextOffsetRight = mcBackground.width - (txtTitle.width + txtTitle.x);
         mBGOriginalHeight = mcBackground.height;
         var _loc1_:TextInput = this.mcTextInput; // I guess this hasn't been initialized
         _loc1_.visible = true;
      }
      //...
   }
}


I got UI Exception Report
Code:
<?xml version="1.0" ?>
<root>
    <report>
        <desyncdata>TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at olympus.controls::GUIComponent/ConfigUI()
    at olympus.controls::GUIComponent/OnAddedToStage()
    at widgets.Pickers::PickersMain/OnPickerSet()
    at olympus.core.widget::WidgetBase/Show()
    at olympus.io::CommunicationObject/DispatchToWidget()
    at olympus.io::CommunicationManager/DispatchStoredOnDemandMessages()
    at olympus.core::LayoutManager/OnDemandWidgetLoadComplete()


Screenshots
Test Subject
Original Poster
#2 Old 22nd Mar 2025 at 8:05 AM
Update, I solved the problem by reusing a variable in the Sprite to make it an input for the input search.
Back to top