public GUIPanel(string name, int layer) : base(name, layer) { System.Type type = GetType(); MethodInfo[] allMethods = type.GetMethods(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); foreach (MethodInfo method in allMethods) { object[] attributes = method.GetCustomAttributes(false); if (attributes.Length == 0) { continue; } foreach (object obj in attributes) { if (obj is GUIPageAttribute page) { Dictionary <int, MethodInfo> dict = null; if (page.MethodType == GUIPageType.DrawMethod) { dict = allPages; } else if (page.MethodType == GUIPageType.DisableMethod) { dict = allDisableMethods; } else if (page.MethodType == GUIPageType.EnableMethod) { dict = allEnableMethods; } dict.Add(page.Page, method); break; } } } animator = new Animation.CenterAnimation(this, Helper.GetScreenMiddle(Style.WindowWidth, Style.WindowHeight)); }
public DebugPanel() : base(nameof(DebugPanel), 369) { animator = new Animation.CenterAnimation(this, Helper.GetScreenMiddle(Style.WindowWidth, Style.WindowHeight)); messages = new List <LogMessage>(); Application.RegisterLogCallback(Log); }
public override void OnUpdateScaling() { animator = new Animation.CenterAnimation(this, Helper.GetScreenMiddle(Style.WindowWidth, Style.WindowHeight)); }
public PausePanel() : base(nameof(PausePanel), 20) { animator = new Animation.CenterAnimation(this, Helper.GetScreenMiddle(Width, Height), 200f, 400f); }
public SkinsPanel() : base(nameof(SkinsPanel), -1) { animator = new Animation.CenterAnimation(this, Helper.GetScreenMiddle(Style.WindowWidth, Style.WindowHeight)); }