Skip to content

Commit

Permalink
Moved the plugin version label and settings button to the main menu o…
Browse files Browse the repository at this point in the history
…nly.

It is no longer in the pause menu
  • Loading branch information
thorwin99 committed Apr 14, 2023
1 parent 69a2314 commit 55599f7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions SEWorldGenPlugin/GUI/MyPluginMainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ public override void RecreateControls(bool constructor)
OPENED_VERSION_NOTIFICATION = true;
MyGuiSandbox.AddScreen(MyGuiSandbox.CreateMessageBox(MyMessageBoxStyleEnum.Info, MyMessageBoxButtonsType.YES_NO, new StringBuilder("A new version of the SEWorldGenPlugin is a available. Do you want to visit the download page now?"), new StringBuilder("SEWorldGenPlugin Update available"), null, null, null, null, OnUpdateNotifiactionMessageClose));
}
}

MyGuiControlLabel pluginVersionLabel = new MyGuiControlLabel();
pluginVersionLabel.Text = string.Format(PLUGIN_LOADED.ToString(), VersionCheck.Static.GetVersion());
pluginVersionLabel.Position = MyGuiManager.ComputeFullscreenGuiCoordinate(MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_BOTTOM, 8, 8);
pluginVersionLabel.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER;
pluginVersionLabel.PositionY -= pluginVersionLabel.Size.Y / 2;
MyGuiControlLabel pluginVersionLabel = new MyGuiControlLabel();
pluginVersionLabel.Text = string.Format(PLUGIN_LOADED.ToString(), VersionCheck.Static.GetVersion());
pluginVersionLabel.Position = MyGuiManager.ComputeFullscreenGuiCoordinate(MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_BOTTOM, 8, 8);
pluginVersionLabel.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER;
pluginVersionLabel.PositionY -= pluginVersionLabel.Size.Y / 2;

MyGuiControlButton pluginSettingsBtn = MyPluginGuiHelper.CreateDebugButton("Settings", OnPluginSettingsClick);
pluginSettingsBtn.Position = pluginVersionLabel.Position;
pluginSettingsBtn.PositionX += pluginVersionLabel.Size.X + (8 / MyGuiConstants.GUI_OPTIMAL_SIZE.X);
pluginSettingsBtn.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER;
MyGuiControlButton pluginSettingsBtn = MyPluginGuiHelper.CreateDebugButton("Settings", OnPluginSettingsClick);
pluginSettingsBtn.Position = pluginVersionLabel.Position;
pluginSettingsBtn.PositionX += pluginVersionLabel.Size.X + (8 / MyGuiConstants.GUI_OPTIMAL_SIZE.X);
pluginSettingsBtn.OriginAlign = MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER;

Controls.Add(pluginVersionLabel);
Controls.Add(pluginSettingsBtn);
Controls.Add(pluginVersionLabel);
Controls.Add(pluginSettingsBtn);
}
}

/// <summary>
Expand Down

0 comments on commit 55599f7

Please sign in to comment.