Skip to content

Commit

Permalink
C# Move corona commands in a common place
Browse files Browse the repository at this point in the history
  • Loading branch information
manups4e committed Mar 3, 2024
1 parent 1023b25 commit caf3360
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
13 changes: 0 additions & 13 deletions ScaleformUI_Csharp/Menus/Pause Menus/LobbyMenu/MainView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,25 +476,12 @@ public override void Draw()
{
if (!Visible || TemporarilyHidden || isBuilding) return;
Minimap.MaintainMap();
BeginScaleformMovieMethodOnFrontend("INSTRUCTIONAL_BUTTONS");
ScaleformMovieMethodAddParamPlayerNameString("SET_DATA_SLOT_EMPTY");
EndScaleformMovieMethod();
base.Draw();
_pause.Draw(true);
if (_firstDrawTick)
{
_pause._lobby.CallFunction("FADE_IN");
_firstDrawTick = false;
timer = GetNetworkTime();
}
if (Main.GameTime - timer < 150)
{
BeginScaleformMovieMethodOnFrontendHeader("SHOW_MENU");
ScaleformMovieMethodAddParamBool(false);
EndScaleformMovieMethod();
BeginScaleformMovieMethodOnFrontendHeader("SHOW_HEADING_DETAILS");
ScaleformMovieMethodAddParamBool(false);
EndScaleformMovieMethod();
}
}

Expand Down
8 changes: 0 additions & 8 deletions ScaleformUI_Csharp/Menus/Pause Menus/PauseMenu/TabView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,6 @@ internal async void buildStore(PlayerListTab tab)
public override void Draw()
{
if (!Visible || TemporarilyHidden || isBuilding) return;
BeginScaleformMovieMethodOnFrontend("INSTRUCTIONAL_BUTTONS");
ScaleformMovieMethodAddParamPlayerNameString("SET_DATA_SLOT_EMPTY");
if (Tabs[Index] is PlayerListTab tab)
{
tab.Minimap.MaintainMap();
Expand All @@ -553,12 +551,6 @@ public override void Draw()
_firstDrawTick = false;
timer = GetNetworkTime();
}
BeginScaleformMovieMethodOnFrontendHeader("SHOW_MENU");
ScaleformMovieMethodAddParamBool(false);
EndScaleformMovieMethod();
BeginScaleformMovieMethodOnFrontendHeader("SHOW_HEADING_DETAILS");
ScaleformMovieMethodAddParamBool(false);
EndScaleformMovieMethod();
}

private void UpdateKeymapItems()
Expand Down
9 changes: 9 additions & 0 deletions ScaleformUI_Csharp/Scaleforms/PauseMenu/PauseMenuScaleform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ public void Draw(bool isLobby = false)
{
if (_visible && GetCurrentFrontendMenuVersion() == GetHashKey("FE_MENU_VERSION_CORONA"))
{
BeginScaleformMovieMethodOnFrontend("INSTRUCTIONAL_BUTTONS");
ScaleformMovieMethodAddParamPlayerNameString("SET_DATA_SLOT_EMPTY");
EndScaleformMovieMethod();
BeginScaleformMovieMethodOnFrontendHeader("SHOW_MENU");
ScaleformMovieMethodAddParamBool(false);
EndScaleformMovieMethod();
BeginScaleformMovieMethodOnFrontendHeader("SHOW_HEADING_DETAILS");
ScaleformMovieMethodAddParamBool(false);
EndScaleformMovieMethod();
SetScriptGfxDrawBehindPausemenu(true);
if (BGEnabled)
{
Expand Down

0 comments on commit caf3360

Please sign in to comment.