/// <summary> /// <para>See MonoBehaviour.OnDisable.</para> /// </summary> protected override void OnDisable() { base.OnDisable(); #if UNITY_EDITOR FontControl.removeText(this); #endif }
/// <summary> /// <para>See MonoBehaviour.OnEnable.</para> /// </summary> protected override void OnEnable() { base.OnEnable(); #if UNITY_EDITOR FontControl.addText(this); refreshLanguage(); #endif }
// Displays the UI for value selection. public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { FontControl fontControl = new FontControl(edSvc, value); edSvc.DropDownControl(fontControl); return(fontControl.Value); } return(value); }
/** 选择语言 */ public void selectLanguage(int type) { if (CommonSetting.languageType == type) { return; } GameC.save.setInt(LocalSaveType.Language, CommonSetting.languageType = type); BaseC.config.refreshConfigForLanguage(); FontControl.refreshLanguage(); GameC.player.dispatch(GameEventType.RefreshLanguage); }
private void lblChangeText_Click(object sender, EventArgs e) { foreach (Control FontControl in this.Controls) { FontControl.Font = Sans; if (FontControl.GetType() == typeof(ListBox)) { FontControl.Font = Sans; } else if (FontControl.GetType() == typeof(Button)) { FontControl.Font = Sans; } } }
private void lbl1_Click(object sender, EventArgs e) { foreach (Control FontControl in this.Controls) { if (FontControl.GetType() == typeof(Label)) { FontControl.BackColor = Color.DarkCyan; FontControl.ForeColor = Color.Gainsboro; Font = Sans; } else if (FontControl.GetType() == typeof(Button)) { FontControl.BackColor = Color.White; FontControl.ForeColor = Color.Goldenrod; Font = Sans; } } }
/// <summary> /// <para>See MonoBehaviour.OnDestroy.</para> /// </summary> protected override void OnDestroy() { base.OnDestroy(); FontControl.removeText(this); }
/// <summary> /// <para>See MonoBehaviour.Awake.</para> /// </summary> protected override void Awake() { base.Awake(); FontControl.addText(this); // refreshLanguage(); }