@@ -330,22 +330,22 @@ public static void ShowConfirmDialog(ItemDrop.ItemData item, int itemAmount)
330330 var okButton = dialog . transform . Find ( "win_bkg/Button_ok" ) . GetComponent < Button > ( ) ;
331331 okButton . onClick . RemoveAllListeners ( ) ;
332332 okButton . onClick . AddListener ( new UnityAction ( OnConfirm ) ) ;
333- okButton . GetComponentInChildren < Text > ( ) . text = "Trash" ;
334- okButton . GetComponentInChildren < Text > ( ) . color = new Color ( 1 , 0.2f , 0.1f ) ;
333+ okButton . GetComponentInChildren < TextMeshProUGUI > ( ) . text = "Trash" ;
334+ okButton . GetComponentInChildren < TextMeshProUGUI > ( ) . color = new Color ( 1 , 0.2f , 0.1f ) ;
335335
336336 var cancelButton = dialog . transform . Find ( "win_bkg/Button_cancel" ) . GetComponent < Button > ( ) ;
337337 cancelButton . onClick . RemoveAllListeners ( ) ;
338338 cancelButton . onClick . AddListener ( new UnityAction ( OnCancel ) ) ;
339339
340340 dialog . transform . Find ( "win_bkg/Slider" ) . gameObject . SetActive ( false ) ;
341341
342- var text = dialog . transform . Find ( "win_bkg/Text" ) . GetComponent < Text > ( ) ;
342+ var text = dialog . transform . Find ( "win_bkg/Text" ) . GetComponent < TextMeshProUGUI > ( ) ;
343343 text . text = Localization . instance . Localize ( item . m_shared . m_name ) ;
344344
345345 var icon = dialog . transform . Find ( "win_bkg/Icon_bkg/Icon" ) . GetComponent < Image > ( ) ;
346346 icon . sprite = item . GetIcon ( ) ;
347347
348- var amount = dialog . transform . Find ( "win_bkg/amount" ) . GetComponent < Text > ( ) ;
348+ var amount = dialog . transform . Find ( "win_bkg/amount" ) . GetComponent < TextMeshProUGUI > ( ) ;
349349
350350 amount . text = itemAmount + "/" + item . m_shared . m_maxStackSize ;
351351
@@ -396,6 +396,7 @@ public class TrashHandler : MonoBehaviour
396396 private void Awake ( )
397397 {
398398 handler = this . GetComponent < UIGroupHandler > ( ) ;
399+ handler . SetActive ( false ) ;
399400 }
400401
401402 private void Update ( )
@@ -404,7 +405,7 @@ private void Update()
404405 {
405406 TrashItems . TrashItem ( ) ;
406407 // Switch back to inventory iab
407- typeof ( InventoryGui ) . GetMethod ( "SetActiveGroup" , BindingFlags . NonPublic | BindingFlags . Instance ) . Invoke ( InventoryGui . instance , new object [ ] { 1 } ) ;
408+ typeof ( InventoryGui ) . GetMethod ( "SetActiveGroup" , BindingFlags . NonPublic | BindingFlags . Instance ) . Invoke ( InventoryGui . instance , new object [ ] { 1 , false } ) ;
408409 }
409410 }
410411 }
0 commit comments