public override void OnLevelLoaded(LoadMode mode) { base.OnLevelLoaded(mode); Debugger.Log("ON_LEVEL_LOADED"); Debugger.OnLevelLoaded(); try { // Don't load if it's not a game if (mode != LoadMode.LoadGame && mode != LoadMode.NewGame) { return; } BuildingThemesManager.instance.ImportThemes(); PolicyPanelEnabler.UnlockPolicyToolbarButton(); UIThemeManager.Initialize(); UIStyleButtonReplacer.ReplaceStyleButton(); } catch (Exception e) { Debugger.LogException(e); } }
public CTitleBar() { InitializeComponent(); MouseDown += MouseDown_Drag; UIThemeManager.RegisterCustomThemeHandler(typeof(CTitleBar), ApplyThemeCustomType_Implementation); UIThemeManager.OnThemeChanged(this, ApplyThemeCustom_Implementation); TitleLabel.MouseDown += MouseDown_Drag; }
public override void OnLevelUnloading() { base.OnLevelUnloading(); Debugger.Log("ON_LEVEL_UNLOADING"); Debugger.OnLevelUnloading(); BuildingThemesManager.instance.Reset(); UIThemeManager.Destroy(); }
public CBorderedForm() { InitializeComponent(); MouseDown += MouseDown_Drag; MainPanel.MouseDown += MouseDown_Drag; UIThemeManager.RegisterCustomThemeHandler(typeof(CBorderedForm), ApplyThemeCustom_Implementation); TypeDescriptor.AddAttributes(this.DesignerContents, new DesignerAttribute(typeof(CBFInnerPanelDesigner))); }
public CErrorDialog(string title, string description) { InitializeComponent(); UIThemeManager.OnThemeChanged(this, OnThemeChanged_Implementation); this.SetThemeAware(); MaximizeBox = true; MinimizeBox = true; Text = title; InnerForm.TitleBarTitle = title; ErrorRTB.Text = description; }
public MainForm() { // Sets up stealth calls for native funcs to try to avoid api hooking NativeStealth.SetStealthMode(NativeStealthType.ManualInvoke); InitializeComponent(); UIThemeManager.OnThemeChanged(this, OnThemeChanged_Implementation); this.SetThemeAware(); MaximizeBox = true; MinimizeBox = true; }
public CComboDialog(string title, object[] selectables, int defaultIndex = 0) { InitializeComponent(); UIThemeManager.OnThemeChanged(this, OnThemeChanged_Implementation); this.SetThemeAware(); MaximizeBox = true; MinimizeBox = true; Text = title; InnerForm.TitleBarTitle = title; cComboBox1.Items.Clear(); cComboBox1.Items.AddRange(selectables); if (defaultIndex > -1 && defaultIndex < selectables.Length) { cComboBox1.SelectedIndex = defaultIndex; } }
public override void OnLevelLoaded(LoadMode mode) { base.OnLevelLoaded(mode); // Don't load if it's not a game if (mode != LoadMode.LoadGame && mode != LoadMode.NewGame) { return; } Debugger.Log("ON_LEVEL_LOADED"); Debugger.AppendModList(); Debugger.AppendThemeList(); PolicyPanelEnabler.UnlockPolicyToolbarButton(); UIThemeManager.Initialize(); }