1- import EquipmentEx.{EquipmentEx, OutfitSystem, RequirementsPopup}
1+ import EquipmentEx.{EquipmentEx, OutfitSystem, ArchivePopup, RequirementsPopup}
22
33@addField(gameuiInventoryGameController)
44private let m_outfitSystem: wref<OutfitSystem >;
@@ -81,8 +81,15 @@ protected func ShowWardrobeScreen() -> Bool {
8181 return false;
8282 }
8383
84- let outfitManager = this.SpawnFromExternal(this.GetRootCompoundWidget(), r"equipment_ex\\gui\\wardrobe.inkwidget", n"Root:EquipmentEx.WardrobeScreenController") as inkCompoundWidget;
85- outfitManager.SetName(n"wardrobe");
84+ let wardrobe = this.SpawnFromExternal(this.GetRootCompoundWidget(), r"equipment_ex\\gui\\wardrobe.inkwidget", n"Root:EquipmentEx.WardrobeScreenController") as inkCompoundWidget;
85+
86+ if !IsDefined(wardrobe) {
87+ this.m_wardrobePopup = ArchivePopup.Show(this);
88+ this.m_wardrobePopup.RegisterListener(this, n"OnWardrobePopupClose");
89+ return false;
90+ }
91+
92+ wardrobe.SetName(n"wardrobe");
8693
8794 let alphaAnim = new inkAnimTransparency();
8895 alphaAnim.SetStartTransparency(0.0);
@@ -94,7 +101,7 @@ protected func ShowWardrobeScreen() -> Bool {
94101 let animDef = new inkAnimDef();
95102 animDef.AddInterpolator(alphaAnim);
96103
97- outfitManager .GetWidgetByPathName(n"wrapper/wrapper").PlayAnimation(animDef);
104+ wardrobe .GetWidgetByPathName(n"wrapper/wrapper").PlayAnimation(animDef);
98105 // animProxy.RegisterToCallback(inkanimEventType.OnFinish, this, n"OnWardrobeScreenShown");
99106
100107 this.m_wardrobeReady = true;
@@ -112,7 +119,7 @@ protected func ShowWardrobeScreen() -> Bool {
112119
113120 let evt = new DropQueueUpdatedEvent();
114121 evt.m_dropQueue = this.m_itemModeLogicController.m_itemDropQueue;
115- outfitManager .GetController().QueueEvent(evt);
122+ wardrobe .GetController().QueueEvent(evt);
116123
117124 return true;
118125}
@@ -129,7 +136,7 @@ protected func HideWardrobeScreen() -> Bool {
129136 return false;
130137 }
131138
132- let outfitManager = this.GetChildWidgetByPath(n"wardrobe") as inkCompoundWidget;
139+ let wardrobe = this.GetChildWidgetByPath(n"wardrobe") as inkCompoundWidget;
133140
134141 this.m_wardrobeReady = false;
135142
@@ -143,7 +150,7 @@ protected func HideWardrobeScreen() -> Bool {
143150 let animDef = new inkAnimDef();
144151 animDef.AddInterpolator(alphaAnim);
145152
146- let animProxy = outfitManager .GetWidgetByPathName(n"wrapper/wrapper").PlayAnimation(animDef);
153+ let animProxy = wardrobe .GetWidgetByPathName(n"wrapper/wrapper").PlayAnimation(animDef);
147154 animProxy.RegisterToCallback(inkanimEventType.OnFinish, this, n"OnWardrobeScreenHidden");
148155
149156 if Equals(this.m_mode, InventoryModes.Item) {
0 commit comments