@@ -25,13 +25,23 @@ protected override void ConstructPanelContent()
2525 minWidth : 150 , minHeight : 25 , flexibleWidth : 9999
2626 ) ;
2727
28- var recordButton = UIFactory . CreateButton ( ContentRoot , "ToggleRecordButton" , "Record" ) ;
28+ var recordButton = UIFactory . CreateButton ( ContentRoot , "ToggleRecordButton" , "Start Record" ) ;
2929 UIFactory . SetLayoutElement ( recordButton . GameObject , minWidth : 150 , minHeight : 25 , flexibleWidth : 9999 ) ;
3030 recordButton . OnClick += ( ) =>
3131 {
32- RecordUtils . StartRecord ( ) ;
3332 var mode = RecordUtils . GetMode ( ) ;
34- recordButton . ButtonText . text = $ "{ ( mode == RCC_Recorder . Mode . Neutral ? "Start" : "Stop" ) } Record";
33+ string nextActionName ;
34+ if ( mode == RCC_Recorder . Mode . Record )
35+ {
36+ nextActionName = "Start" ;
37+ }
38+ else
39+ {
40+ UIManager . ShowMenu = false ;
41+ nextActionName = "Stop" ;
42+ }
43+ recordButton . ButtonText . text = $ "{ nextActionName } Record";
44+ RecordUtils . StartRecord ( ) ;
3545 } ;
3646
3747 var replayButton = UIFactory . CreateButton ( ContentRoot , "ToggleReplayButton" , "Replay" ) ;
@@ -45,6 +55,7 @@ protected override void ConstructPanelContent()
4555 }
4656 else
4757 {
58+ UIManager . ShowMenu = false ;
4859 RecordUtils . StartReplay ( ) ;
4960 }
5061 } ;
0 commit comments