public static void Create() { TopBarGump gump = UIManager.GetGump <TopBarGump>(); if (gump == null) { if (ProfileManager.Current.TopbarGumpPosition.X < 0 || ProfileManager.Current.TopbarGumpPosition.Y < 0) { ProfileManager.Current.TopbarGumpPosition = Point.Zero; } UIManager.Add(gump = new TopBarGump { X = ProfileManager.Current.TopbarGumpPosition.X, Y = ProfileManager.Current.TopbarGumpPosition.Y }); if (ProfileManager.Current.TopbarGumpIsMinimized) { gump.ChangePage(2); } } else { Log.Error("TopBarGump already exists!!"); } }
//private static TopBarGump _gump; public static void Create() { TopBarGump gump = Engine.UI.GetControl <TopBarGump>(); if (gump == null) { if (Engine.Profile.Current.TopbarGumpPosition.X < 0 || Engine.Profile.Current.TopbarGumpPosition.Y < 0) { Engine.Profile.Current.TopbarGumpPosition = Point.Zero; } Engine.UI.Add(gump = new TopBarGump { X = Engine.Profile.Current.TopbarGumpPosition.X, Y = Engine.Profile.Current.TopbarGumpPosition.Y }); if (Engine.Profile.Current.TopbarGumpIsMinimized) { gump.ChangePage(2); } } else { Log.Message(LogTypes.Error, "TopBarGump already exists!!"); } }