1- using MelonLoader ;
1+ using Astrum . AstralCore . UI ;
2+ using Astrum . AstralCore . UI . Attributes ;
3+ using MelonLoader ;
24using System ;
35using System . Collections . Generic ;
46using UnityEngine ;
5- using static Astrum . AstralCore . Managers . CommandManager ;
6- using static Astrum . AstralCore . Managers . ModuleManager ;
77
8- [ assembly: MelonInfo ( typeof ( Astrum . AstralUI . UIMGUI ) , "AstralUI.UIMGUI" , "0.2 .0" , downloadLink : "github.com/Astrum-Project/AstralUI.UIMGUI" ) ]
8+ [ assembly: MelonInfo ( typeof ( Astrum . AstralUI . UIMGUI ) , "AstralUI.UIMGUI" , "1.0 .0" , downloadLink : "github.com/Astrum-Project/AstralUI.UIMGUI" ) ]
99[ assembly: MelonColor ( ConsoleColor . DarkMagenta ) ]
1010
1111namespace Astrum . AstralUI
@@ -48,7 +48,7 @@ private void ModulesWindow(int id)
4848 {
4949 int i = 0 ;
5050
51- foreach ( KeyValuePair < string , Module > module in modules )
51+ foreach ( KeyValuePair < string , Module > module in CoreUI . Modules )
5252 if ( GUI . Button ( new Rect ( 3 , i ++ * 22 + 21 , 150 , 20 ) , module . Key ) )
5353 currentModule = module . Value ;
5454
@@ -59,19 +59,19 @@ private void CommandsWindow(int windowID)
5959 {
6060 int i = 0 ;
6161
62- foreach ( KeyValuePair < string , Command > command in currentModule . commands )
62+ foreach ( KeyValuePair < string , UIBase > command in currentModule . Commands )
6363 {
64- if ( command . Value is ConVar < bool > cb )
64+ if ( command . Value is UIFieldProp < bool > cb )
6565 cb . Value = GUI . Toggle ( CreateRect ( ref i ) , cb . Value , command . Key ) ;
66- else if ( command . Value is ConVar < float > cf )
66+ else if ( command . Value is UIFieldProp < float > cf )
6767 {
6868 GUI . Label ( CreateRect ( ref i ) , command . Key + $ ": ({ cf . Value : 0.00} )") ;
6969 cf . Value = GUI . HorizontalSlider ( CreateRect ( ref i ) , cf . Value , cf . Value - 10 , cf . Value + 10 ) ;
7070 }
71- else if ( command . Value is Button )
71+ else if ( command . Value is UIButton )
7272 {
7373 if ( GUI . Button ( CreateRect ( ref i ) , command . Key ) )
74- ( command . Value as Button ) ? . onClick ( ) ;
74+ ( command . Value as UIButton ) ? . Click ( ) ;
7575 }
7676 else GUI . Label ( CreateRect ( ref i ) , command . Key + " (Unsupported type)" ) ;
7777 }
0 commit comments