24 public const string fName =
"MainMenuScreen";
42 m_fullscreenButton.IsVisible =
true;
43 m_dashboardButton.IsVisible =
true;
46 "OnMainMenuScreenCreated",
54 public override void Enter(
object[] parameters) {
65 m_disableSafeModeButton.IsVisible =
true;
79 m_versionString = $
"Version {VersionsManager.Version}{(MarketplaceManager.IsTrialMode ? " (
Day One)
" : string.Empty)}";
83 Children.Find<
LabelWidget>(
"Version").Text = $
"{m_versionString} - API {ModsManager.APIVersionString}";
86 rectangleWidget.RenderTransform =
87 Matrix.
CreateTranslation((0f - rectangleWidget.ActualSize.X) / 2f, (0f - rectangleWidget.ActualSize.Y) / 2f, 0f)
96 float scale = (angle + MathF.PI / 4) / (MathF.PI / 2);
97 scale -= MathF.Round(scale);
98 scale *= MathF.PI / 2;
99 scale =
new Vector2(1, MathF.Tan(scale)).
Length() / MathF.Sqrt(2);
109 m_updateButtonIcon.FillColor = APIUpdateManager.IsNeedUpdate.Value ? Color.Yellow :
Color.
White;
static float Remainder(float x, float y)
static double FrameStartTime
static WindowMode WindowMode
static ? bool IsNeedUpdate
API是否需要更新?ture:需要;false:不需要;null:正在获取
static object Get(Type type, string name)
static void ShowDialog(ContainerWidget parentWidget, Dialog dialog)
static void CreateLanguageSelectionDialog(Widget parent)
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
LabelWidget m_copyrightLabel
ButtonWidget m_updateCheckButton
bool m_versionStringTrial
Subtexture m_needToUpdateIcon
ButtonWidget m_disableSafeModeButton
ButtonWidget m_showBulletinButton
override void Enter(object[] parameters)
StackPanelWidget m_rightBottomBar
ButtonWidget m_dashboardButton
Subtexture m_dontNeedUpdateIcon
ButtonWidget m_fullscreenButton
StackPanelWidget m_leftBottomBar
RectangleWidget m_updateButtonIcon
ButtonWidget m_languageSwitchButton
static void ShowMarketplace()
static Bulletin m_bulletin
static void ShowBulletin()
static bool CanShowBulletin
static float FinalUiScale
static void SwitchScreen(string name, params object[] parameters)
static int IsolatedStorageMigrationCounter
static bool AdaptEdgeToEdgeDisplay
static void MigrateDataFromIsolatedStorageWithDialog()
static void LaunchBrowser(string url)
static void HookAction(string HookName, Func< ModLoader, bool > action)
执行Hook
static string APIReleasesLink_API
static Matrix CreateTranslation(float x, float y, float z)
static Matrix CreateRotationZ(float radians)
static Matrix CreateScale(float scale)