static LoginScene() { Scene = new MirScene { Size = Settings.ScreenSize, }; Scene.Shown += Scene_Shown; Scene.VisibleChanged += Scene_VisibleChanged; Scene.KeyPress += Scene_KeyPress; Background = new MirAnimatedControl { Animated = false, AnimationCount = 19, AnimationDelay = 100, Index = 0, Library = Libraries.ChrSel, Loop = false, Parent = Scene, }; Background.AfterAnimation += new EventHandler(Background_AfterAnimation); VersionLabel = new MirLabel { AutoSize = true, BackColor = Color.FromArgb(200, 50, 50, 50), Border = true, BorderColor = Color.Black, Location = new Point(5, 580), Parent = Background, Text = "Version: " + Application.ProductVersion }; }
static GameScene() { Scene = new MirScene { Size = Settings.ScreenSize }; Scene.BeforeDraw += Scene_BeforeDraw; Scene.MouseDown += Scene_MouseDown; Scene.MouseUp += Scene_MouseUp; Scene.MouseMove += Scene_MouseMove; Scene.KeyDown += Scene_KeyDown; Scene.KeyPress += Scene_KeyPress; Scene.AfterDraw += Scene_AfterDraw; for (int I = 0; I < OutputLines.Length; I++) { OutputLines[I] = new MirLabel { AutoSize = true, BackColor = Color.Transparent, ForeColor = Color.DarkGreen, OutLine = true, Location = new Point(20, 50 + I * 13), Font = new Font("Microsoft Sans Serif", 8F) } } ; MainPanel.Create(); MiniMap.Create(); ChatPanel.Create(); BeltPanel.Create(); }
private void CleanUp() { Tooltip.cam = null; User.gameObject.SetActive(false); User.Player = null; User.Inventory = new UserItem[46]; User.Equipment = new UserItem[14]; UserGameObject = null; ClearObjects(); CurrentScene = null; }
private void CleanUp() { Tooltip.cam = null; User.gameObject.SetActive(false); User.Player = null; User.Inventory = new UserItem[46]; User.Equipment = new UserItem[14]; UserGameObject = null; foreach (var ob in ObjectList.ToArray()) { Destroy(ob.Value.gameObject); } ObjectList.Clear(); CurrentScene = null; }
static SelectScene() { SelectedIndex = -1; Scene = new MirScene { Size = Settings.ScreenSize, Visible = false, }; Scene.KeyPress += Scene_KeyPress; Scene.Shown += Scene_Shown; Scene.VisibleChanged += Scene_VisibleChanged; Background = new MirImageControl { Index = 64, Library = Libraries.Prguse, Parent = Scene, }; ServerLabel = new MirLabel() { Location = new Point(322, 44), DrawFormat = DrawTextFormat.Center | DrawTextFormat.VerticalCenter, Parent = Background, Size = new Size(155, 17), Text = "Legend of Mir 2", }; StartGameButton = new MirButton { Enabled = false, HoverIndex = 341, Index = 340, Library = Libraries.Title, Location = new Point(110, 568), Parent = Background, PressedIndex = 342 }; StartGameButton.Click += new EventHandler(StartGameButton_Click); NewCharacterButton = new MirButton { HoverIndex = 344, Index = 343, Library = Libraries.Title, Location = new Point(230, 568), Parent = Background, PressedIndex = 345 }; NewCharacterButton.Click += NewCharacterButton_Click; DeleteCharacterButton = new MirButton { HoverIndex = 347, Index = 346, Library = Libraries.Title, Location = new Point(350, 568), Parent = Background, PressedIndex = 348 }; DeleteCharacterButton.Click += new EventHandler(DeleteCharacterButton_Click); /* CreditsButton = new MirButton { HoverIndex = 350, Index = 349, Library = Libraries.Title, Location = new Point(470, 568), Parent = Background, PressedIndex = 351 };*/ ExitGame = new MirButton { HoverIndex = 353, Index = 352, Library = Libraries.Title, Location = new Point(590, 568), Parent = Background, PressedIndex = 354 }; ExitGame.Click += (o, e) => SceneFunctions.QuitGame(); CharacterDisplay = new MirAnimatedControl { Animated = true, AnimationCount = 16, AnimationDelay = 250, FadeIn = true, FadeInDelay = 75, FadeInRate = 0.1F, Index = 20, Library = Libraries.ChrSel, Location = new Point(200, 300), Parent = Background, UseOffSet = true, // Visible = false }; CharacterDisplay.BeforeDraw += new EventHandler(CharacterDisplay_BeforeDraw); CharacterDisplay.AfterDraw += new EventHandler(CharacterDisplay_GlowEffect); Character1Button = new MirImageControl { Index = 45, Library = Libraries.Prguse, Location = new Point(447, 122), Parent = Background, Sound = SoundList.ClickA, }; Character1Button.Click += Character1Button_Click; Character2Button = new MirImageControl { Index = 45, Library = Libraries.Prguse, Location = new Point(447, 226), Parent = Background, Sound = SoundList.ClickA, }; Character2Button.Click += new EventHandler(Character2Button_Click); Character3Button = new MirImageControl { Index = 45, Library = Libraries.Prguse, Location = new Point(447, 330), Parent = Background, Sound = SoundList.ClickA, }; Character3Button.Click += new EventHandler(Character3Button_Click); Character4Button = new MirImageControl { Index = 45, Library = Libraries.Prguse, Location = new Point(447, 434), Parent = Background, Sound = SoundList.ClickA, }; Character4Button.Click += new EventHandler(Character4Button_Click); Character1Name = new MirLabel { Location = new Point(107, 9), Parent = Character1Button, NotControl = true, Size = new Size(170, 18), Visible = false }; Character1Level = new MirLabel { Location = new Point(107, 28), Parent = Character1Button, NotControl = true, Size = new Size(30, 18), Visible = false }; Character1Class = new MirLabel { Location = new Point(178, 28), Parent = Character1Button, NotControl = true, Size = new Size(100, 18), Visible = false }; Character2Name = new MirLabel { Location = new Point(107, 9), Parent = Character2Button, NotControl = true, Size = new Size(170, 18), Visible = false }; Character2Level = new MirLabel { Location = new Point(107, 28), Parent = Character2Button, NotControl = true, Size = new Size(30, 18), Visible = false }; Character2Class = new MirLabel { Location = new Point(178, 28), Parent = Character2Button, NotControl = true, Size = new Size(100, 18), Visible = false }; Character3Name = new MirLabel { Location = new Point(107, 9), Parent = Character3Button, NotControl = true, Size = new Size(170, 18), Visible = false }; Character3Level = new MirLabel { Location = new Point(107, 28), Parent = Character3Button, NotControl = true, Size = new Size(30, 18), Visible = false }; Character3Class = new MirLabel { Location = new Point(178, 28), Parent = Character3Button, NotControl = true, Size = new Size(100, 18), Visible = false }; Character4Name = new MirLabel { Location = new Point(107, 9), Parent = Character4Button, NotControl = true, Size = new Size(170, 18), Visible = false }; Character4Level = new MirLabel { Location = new Point(107, 28), Parent = Character4Button, NotControl = true, Size = new Size(30, 18), Visible = false }; Character4Class = new MirLabel { Location = new Point(178, 28), Parent = Character4Button, NotControl = true, Size = new Size(100, 18), Visible = false }; LastAccessLabel = new MirLabel { DrawFormat = DrawTextFormat.VerticalCenter, Location = new Point(140, 510), Parent = Background, Size = new Size(189, 21), }; LastAccessLabelLabel = new MirLabel { DrawFormat = DrawTextFormat.VerticalCenter, Location = new Point(-80, 0), Parent = LastAccessLabel, Text = "Last Online:", Size = new Size(100, 21), }; }