public void InitMapEditorWidgets() { mapEditor_Menu = new Panel("mapEditor_Menu"); mapEditor_Menu.Location = new Point(0, this.shortcutBar.Y); mapEditor_Menu.Size = this.shortcutBar.Size; mapEditor_Menu.BackColor = Color.Transparent; tilesetViewer = new Widgets.TilesetViewer("tilesetViewer"); tilesetViewer.Location = new Point(0, this.pnlTeam.Height + 32); tilesetViewer.Size = new Size(this.mapViewer.X, Screen.Height - pnlTeam.Height - shortcutBar.Height - 32); tilesetViewer.ActiveTilesetSurface = Graphics.GraphicsManager.Tiles[0]; tilesetViewer.Visible = false; btnTerrain = new Button("btnTerrain"); btnTerrain.Font = Graphics.FontManager.LoadFont("PMU", 18); btnTerrain.Location = new Point(0, this.pnlTeam.Height); btnTerrain.Size = new System.Drawing.Size(this.mapViewer.X / 2, 32); btnTerrain.Text = "Terrain"; btnTerrain.Selected = true; btnTerrain.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnTerrain_Click); btnTerrain.Visible = false; Skins.SkinManager.LoadButtonGui(btnTerrain); btnAttributes = new Button("btnAttributes"); btnAttributes.Font = Graphics.FontManager.LoadFont("PMU", 18); btnAttributes.Location = new Point(this.mapViewer.X / 2, this.pnlTeam.Height); btnAttributes.Size = new System.Drawing.Size(this.mapViewer.X / 2, 32); btnAttributes.Text = "Attributes"; btnAttributes.Selected = false; btnAttributes.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnAttributes_Click); btnAttributes.Visible = false; Skins.SkinManager.LoadButtonGui(btnAttributes); #region Attributes Widgets pnlAttributes = new Panel("pnlAttributes"); pnlAttributes.Size = tilesetViewer.Size; pnlAttributes.Location = tilesetViewer.Location; pnlAttributes.BackColor = Color.White; pnlAttributes.Visible = false; #region Attribute Options pnlAttOptions = new Panel("pnlAttOptions"); pnlAttOptions.Size = tilesetViewer.Size; pnlAttOptions.Location = new Point(0, this.pnlTeam.Height); pnlAttOptions.BackColor = Color.White; pnlAttOptions.Visible = false; btnTitle = new Button("btnTitle"); btnTitle.Location = new Point(0, 0); btnTitle.Size = new Size(134, 32); btnTitle.Font = Graphics.FontManager.LoadFont("PMU", 18); btnTitle.Visible = false; Skins.SkinManager.LoadButtonGui(btnTitle); lbl1 = new Label("lbl1"); lbl1.AutoSize = true; lbl1.Font = Graphics.FontManager.LoadFont("PMU", 18); lbl1.Location = new Point(0, 35); lbl1.Visible = false; lbl2 = new Label("lbl2"); lbl2.AutoSize = true; lbl2.Font = Graphics.FontManager.LoadFont("PMU", 18); lbl2.Visible = false; lbl3 = new Label("lbl3"); lbl3.AutoSize = true; lbl3.Font = Graphics.FontManager.LoadFont("PMU", 18); lbl3.Visible = false; lbl4 = new Label("lbl4"); lbl4.AutoSize = true; lbl4.Font = Graphics.FontManager.LoadFont("PMU", 18); lbl4.Visible = false; lblMode = new Label("lblMode"); lblMode.AutoSize = true; lblMode.Font = Graphics.FontManager.LoadFont("PMU", 18); lblMode.Location = new Point(); lblMode.Visible = false; txt1 = new TextBox("txt1"); txt1.Size = new Size(134, 18); txt1.Visible = false; txt2 = new TextBox("txt2"); txt2.Size = new Size(134, 18); txt2.Visible = false; txt3 = new TextBox("txt3"); txt3.Size = new Size(134, 18); txt3.Visible = false; hsb1 = new HScrollBar("hsb1"); hsb1.Size = new Size(134, 20); hsb1.Visible = false; hsb1.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsb1_ValueChanged); hsb2 = new HScrollBar("hsb2"); hsb2.Size = new Size(134, 20); hsb2.Visible = false; hsb2.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsb2_ValueChanged); hsb3 = new HScrollBar("hsb3"); hsb3.Size = new Size(134, 20); hsb3.Visible = false; hsb3.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsb3_ValueChanged); picSprite = new PictureBox("picSprite"); picSprite.Size = new Size(32, 64); picSprite.BlitToBuffer(Graphics.GraphicsManager.GetSpriteSheet(hsb1.Value).GetSheet(Graphics.FrameType.Idle, Enums.Direction.Down), new Rectangle(96, 0, 32, 64)); picSprite.Location = new Point(140, 35); picSprite.BackColor = Color.White; picSprite.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; picSprite.Visible = false; picSprite2 = new PictureBox("picSprite2"); picSprite2.Size = new Size(32, 64); picSprite2.BlitToBuffer(Graphics.GraphicsManager.GetSpriteSheet(hsb2.Value).GetSheet(Graphics.FrameType.Idle, Enums.Direction.Down), new Rectangle(96, 0, 32, 64)); picSprite2.Location = new Point(75, 130); picSprite2.BackColor = Color.White; picSprite2.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; picSprite2.Visible = false; lstSound = new ListBox("lstSound"); lstSound.Location = new Point(10, 60); lstSound.Size = new Size(180, 140); { SdlDotNet.Graphics.Font font = Logic.Graphics.FontManager.LoadFont("PMU", 18); string[] sfxFiles = System.IO.Directory.GetFiles(IO.Paths.SfxPath); for (int i = 0; i < sfxFiles.Length; i++) { lstSound.Items.Add(new ListBoxTextItem(font, System.IO.Path.GetFileName(sfxFiles[i]))); } } lstSound.Visible = false; chkTake = new CheckBox("chkTake"); chkTake.BackColor = Color.Transparent; chkTake.Size = new System.Drawing.Size(125, 17); chkTake.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); chkTake.Text = "Take away key upon use"; chkTake.Visible = false; chkHidden = new CheckBox("chkHidden"); chkHidden.BackColor = Color.Transparent; chkHidden.Size = new System.Drawing.Size(125, 17); chkHidden.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); chkHidden.Text = "Hidden"; chkHidden.Visible = false; chkHidden.CheckChanged += new EventHandler(chkHidden_CheckChanged); nudStoryLevel = new NumericUpDown("nudStoryLevel"); nudStoryLevel.Size = new Size(134, 20); nudStoryLevel.Font = Graphics.FontManager.LoadFont("PMU", 18); nudStoryLevel.Visible = false; optAllow = new RadioButton("optAllow"); optAllow.Size = new Size(75, 17); optAllow.Location = new Point(0, 200); optAllow.Font = Graphics.FontManager.LoadFont("tahoma", 12); optAllow.Text = "Allow"; optAllow.Visible = false; optAllow.CheckChanged += new EventHandler(optAllow_CheckChanged); optBlock = new RadioButton("optBlock"); optBlock.Size = new Size(75, 17); optBlock.Location = new Point(100, 200); optBlock.Font = Graphics.FontManager.LoadFont("tahoma", 12); optBlock.Text = "Block"; optBlock.Visible = false; optBlock.CheckChanged += new EventHandler(optBlock_CheckChanged); btnOK = new Button("btnOK"); btnOK.Location = new Point(this.mapViewer.X / 4, Screen.Height - shortcutBar.Height - 32); btnOK.Size = new System.Drawing.Size(this.mapViewer.X / 2, 32); btnOK.Font = Graphics.FontManager.LoadFont("PMU", 18); btnOK.Text = "Ok"; btnOK.Visible = false; btnOK.Click += new EventHandler<MouseButtonEventArgs>(btnOK_Click); Skins.SkinManager.LoadButtonGui(btnOK); /*btnBack = new Button("btnBack"); btnBack.Location = new Point(0, Screen.Height - shortcutBar.Height - 32); btnBack.Size = new System.Drawing.Size(this.mapViewer.X / 2, 32); btnBack.Font = Graphics.FontManager.LoadFont("PMU", 18); btnBack.Text = "Back"; btnBack.Visible = false; btnBack.Click +=new EventHandler<MouseButtonEventArgs>(btnBack_Click); Skins.SkinManager.LoadButtonGui(btnBack);*/ pnlAttOptions.AddWidget(lbl1); pnlAttOptions.AddWidget(lbl2); pnlAttOptions.AddWidget(lbl3); pnlAttOptions.AddWidget(lbl4); pnlAttOptions.AddWidget(lblMode); pnlAttOptions.AddWidget(txt1); pnlAttOptions.AddWidget(txt2); pnlAttOptions.AddWidget(txt3); pnlAttOptions.AddWidget(hsb1); pnlAttOptions.AddWidget(hsb2); pnlAttOptions.AddWidget(hsb3); pnlAttOptions.AddWidget(picSprite); pnlAttOptions.AddWidget(picSprite2); pnlAttOptions.AddWidget(lstSound); pnlAttOptions.AddWidget(chkTake); pnlAttOptions.AddWidget(chkHidden); pnlAttOptions.AddWidget(nudStoryLevel); pnlAttOptions.AddWidget(optAllow); pnlAttOptions.AddWidget(optBlock); pnlAttOptions.AddWidget(btnTitle); #endregion optBlocked = new RadioButton("optBlocked"); optBlocked.BackColor = Color.Transparent; optBlocked.Font = Graphics.FontManager.LoadFont("tahoma", 12); optBlocked.Location = new Point(8, 6); optBlocked.Size = new System.Drawing.Size(95, 17); optBlocked.Text = "Blocked"; optBlocked.Checked = true; optNpcAvoid = new RadioButton("optNpcAvoid"); optNpcAvoid.BackColor = Color.Transparent; optNpcAvoid.Font = Graphics.FontManager.LoadFont("tahoma", 12); optNpcAvoid.Location = new Point(8, 75); optNpcAvoid.Size = new System.Drawing.Size(95, 17); optNpcAvoid.Text = "Npc Avoid"; optNotice = new RadioButton("optNotice"); optNotice.BackColor = Color.Transparent; optNotice.Font = Graphics.FontManager.LoadFont("tahoma", 12); optNotice.Location = new Point(8, 236); optNotice.Size = new System.Drawing.Size(95, 17); optNotice.Text = "Notice"; optNotice.Click += new EventHandler<MouseButtonEventArgs>(optNotice_CheckChanged); optSign = new RadioButton("optSign"); optSign.BackColor = Color.Transparent; optSign.Font = Graphics.FontManager.LoadFont("tahoma", 12); optSign.Location = new Point(105, 6); optSign.Size = new System.Drawing.Size(95, 17); optSign.Text = "Sign"; optSign.Click += new EventHandler<MouseButtonEventArgs>(optSign_CheckChanged); optHeal = new RadioButton("optHeal"); optHeal.BackColor = Color.Transparent; optHeal.Font = Graphics.FontManager.LoadFont("tahoma", 12); optHeal.Location = new Point(8, 144); optHeal.Size = new System.Drawing.Size(95, 17); optHeal.Text = "Heal"; optKill = new RadioButton("optKill"); optKill.BackColor = Color.Transparent; optKill.Font = Graphics.FontManager.LoadFont("tahoma", 12); optKill.Location = new Point(8, 167); optKill.Size = new System.Drawing.Size(95, 17); optKill.Text = "Kill"; optGuildBlock = new RadioButton("optGuildBlock"); optGuildBlock.BackColor = Color.Transparent; optGuildBlock.Font = Graphics.FontManager.LoadFont("tahoma", 12); optGuildBlock.Location = new Point(105, 98); optGuildBlock.Size = new System.Drawing.Size(95, 17); optGuildBlock.Text = "Guild"; //optGuildBlock.Click += new EventHandler<MouseButtonEventArgs>(optGuildBlock_CheckChanged); optLevelBlock = new RadioButton("optLevelBlock"); optLevelBlock.BackColor = Color.Transparent; optLevelBlock.Font = Graphics.FontManager.LoadFont("tahoma", 12); optLevelBlock.Location = new Point(105, 144); optLevelBlock.Size = new System.Drawing.Size(95, 17); optLevelBlock.Text = "Level Block"; optLevelBlock.Click += new EventHandler<MouseButtonEventArgs>(optLevelBlock_CheckChanged); optSpriteChange = new RadioButton("optSpriteChange"); optSpriteChange.BackColor = Color.Transparent; optSpriteChange.Font = Graphics.FontManager.LoadFont("tahoma", 12); optSpriteChange.Location = new Point(8, 282); optSpriteChange.Size = new System.Drawing.Size(112, 17); optSpriteChange.Text = "New Sprite"; optSpriteChange.Click += new EventHandler<MouseButtonEventArgs>(optSpriteChange_CheckChanged); optWarp = new RadioButton("optWarp"); optWarp.BackColor = Color.Transparent; optWarp.Font = Graphics.FontManager.LoadFont("tahoma", 12); optWarp.Location = new Point(8, 29); optWarp.Size = new System.Drawing.Size(95, 17); optWarp.Text = "Warp"; optWarp.CheckChanged += new EventHandler(optWarp_CheckChanged); optItem = new RadioButton("optItem"); optItem.BackColor = Color.Transparent; optItem.Font = Graphics.FontManager.LoadFont("tahoma", 12); optItem.Location = new Point(8, 52); optItem.Size = new System.Drawing.Size(95, 17); optItem.Text = "Item"; optItem.CheckChanged += new EventHandler(optItem_CheckChanged); optKey = new RadioButton("optKey"); optKey.BackColor = Color.Transparent; optKey.Font = Graphics.FontManager.LoadFont("tahoma", 12); optKey.Location = new Point(8, 98); optKey.Size = new System.Drawing.Size(95, 17); optKey.Text = "Key"; optKey.CheckChanged += new EventHandler(optKey_CheckChanged); optKeyOpen = new RadioButton("optKeyOpen"); optKeyOpen.BackColor = Color.Transparent; optKeyOpen.Font = Graphics.FontManager.LoadFont("tahoma", 12); optKeyOpen.Location = new Point(8, 121); optKeyOpen.Size = new System.Drawing.Size(95, 17); optKeyOpen.Text = "Key Open"; optKeyOpen.CheckChanged += new EventHandler(optKeyOpen_CheckChanged); optSound = new RadioButton("optSound"); optSound.BackColor = Color.Transparent; optSound.Font = Graphics.FontManager.LoadFont("tahoma", 12); optSound.Location = new Point(8, 190); optSound.Size = new System.Drawing.Size(95, 17); optSound.Text = "Sound"; optSound.CheckChanged += new EventHandler(optSound_CheckChanged); optScripted = new RadioButton("optScripted"); optScripted.BackColor = Color.Transparent; optScripted.Font = Graphics.FontManager.LoadFont("tahoma", 12); optScripted.Location = new Point(8, 213); optScripted.Size = new System.Drawing.Size(95, 17); optScripted.Text = "Scripted"; optScripted.CheckChanged += new EventHandler(optScripted_CheckChanged); optDoor = new RadioButton("optDoor"); optDoor.BackColor = Color.Transparent; optDoor.Font = Graphics.FontManager.LoadFont("tahoma", 12); optDoor.Location = new Point(8, 259); optDoor.Size = new System.Drawing.Size(95, 17); optDoor.Text = "Door"; optShop = new RadioButton("optShop"); optShop.BackColor = Color.Transparent; optShop.Font = Graphics.FontManager.LoadFont("tahoma", 12); optShop.Location = new Point(105, 29); optShop.Size = new System.Drawing.Size(95, 17); optShop.Text = "Shop"; optShop.CheckChanged += new EventHandler(optShop_CheckChanged); optArena = new RadioButton("optArena"); optArena.BackColor = Color.Transparent; optArena.Font = Graphics.FontManager.LoadFont("tahoma", 12); optArena.Location = new Point(105, 52); optArena.Size = new System.Drawing.Size(95, 17); optArena.Text = "Arena"; optArena.CheckChanged += new EventHandler(optArena_CheckChanged); optBank = new RadioButton("optBank"); optBank.BackColor = Color.Transparent; optBank.Font = Graphics.FontManager.LoadFont("tahoma", 12); optBank.Location = new Point(105, 75); optBank.Size = new System.Drawing.Size(95, 17); optBank.Text = "Bank"; optBank.CheckChanged += new EventHandler(optBank_CheckChanged); optSpriteBlock = new RadioButton("optSpriteBlock"); optSpriteBlock.BackColor = Color.Transparent; optSpriteBlock.Font = Graphics.FontManager.LoadFont("tahoma", 12); optSpriteBlock.Location = new Point(105, 121); optSpriteBlock.Size = new System.Drawing.Size(105, 17); optSpriteBlock.Text = "Sprite Block"; optSpriteBlock.CheckChanged += new EventHandler(optSpriteBlock_CheckChanged); optAssembly = new RadioButton("optAssembly"); optAssembly.BackColor = Color.Transparent; optAssembly.Font = Graphics.FontManager.LoadFont("tahoma", 12); optAssembly.Location = new Point(8, 328); optAssembly.Size = new System.Drawing.Size(145, 17); optAssembly.Text = "Assembly"; optEvolution = new RadioButton("optEvolution"); optEvolution.BackColor = Color.Transparent; optEvolution.Font = Graphics.FontManager.LoadFont("tahoma", 12); optEvolution.Location = new Point(105, 167); optEvolution.Size = new System.Drawing.Size(95, 17); optEvolution.Text = "Evolution"; optStory = new RadioButton("optStory"); optStory.BackColor = Color.Transparent; optStory.Font = Graphics.FontManager.LoadFont("tahoma", 12); optStory.Location = new Point(105, 190); optStory.Size = new System.Drawing.Size(95, 17); optStory.Text = "Story"; optStory.CheckChanged += new EventHandler(optStory_CheckChanged); optLinkShop = new RadioButton("optLinkShop"); optLinkShop.BackColor = Color.Transparent; optLinkShop.Font = Graphics.FontManager.LoadFont("tahoma", 12); optLinkShop.Location = new Point(105, 213); optLinkShop.Size = new System.Drawing.Size(95, 17); optLinkShop.Text = "Link Shop"; optLinkShop.CheckChanged += new EventHandler(optLinkShop_CheckChanged); optMobileBlock = new RadioButton("optMobileBlock"); optMobileBlock.BackColor = Color.Transparent; optMobileBlock.Font = Graphics.FontManager.LoadFont("tahoma", 12); optMobileBlock.Location = new Point(105, 236); optMobileBlock.Size = new System.Drawing.Size(105, 17); optMobileBlock.Text = "Mobile Block"; optMobileBlock.CheckChanged += new EventHandler(optMobileBlock_CheckChanged); optMission = new RadioButton("optMission"); optMission.BackColor = Color.Transparent; optMission.Font = Graphics.FontManager.LoadFont("tahoma", 12); optMission.Location = new Point(8, 351); optMission.Size = new System.Drawing.Size(115, 17); optMission.Text = "Mission Board"; optScriptedSign = new RadioButton("optScriptedSign"); optScriptedSign.BackColor = Color.Transparent; optScriptedSign.Font = Graphics.FontManager.LoadFont("tahoma", 12); optScriptedSign.Location = new Point(8, 305); optScriptedSign.Size = new System.Drawing.Size(105, 17); optScriptedSign.Text = "Scripted Sign"; optScriptedSign.CheckChanged += new EventHandler(optScriptedSign_CheckChanged); optAmbiguous = new RadioButton("optAmbiguous"); optAmbiguous.BackColor = Color.Transparent; optAmbiguous.Font = Graphics.FontManager.LoadFont("tahoma", 12); optAmbiguous.Location = new Point(105, 259); optAmbiguous.Size = new System.Drawing.Size(95, 17); optAmbiguous.Text = "Ambiguous"; optSlippery = new RadioButton("optSlippery"); optSlippery.BackColor = Color.Transparent; optSlippery.Font = Graphics.FontManager.LoadFont("tahoma", 12); optSlippery.Location = new Point(105, 282); optSlippery.Size = new System.Drawing.Size(95, 17); optSlippery.Text = "Slippery"; optSlippery.CheckChanged += new EventHandler(optSlippery_CheckChanged); optSlow = new RadioButton("optSlow"); optSlow.BackColor = Color.Transparent; optSlow.Font = Graphics.FontManager.LoadFont("tahoma", 12); optSlow.Location = new Point(105, 305); optSlow.Size = new System.Drawing.Size(95, 17); optSlow.Text = "Slow"; optSlow.CheckChanged += new EventHandler(optSlow_CheckChanged); optDropShop = new RadioButton("optDropShop"); optDropShop.BackColor = Color.Transparent; optDropShop.Font = Graphics.FontManager.LoadFont("tahoma", 12); optDropShop.Location = new Point(105, 328); optDropShop.Size = new System.Drawing.Size(95, 17); optDropShop.Text = "DropShop"; optDropShop.CheckChanged += new EventHandler(optDropShop_CheckChanged); lblDungeonTileValue = new Label("lblDungeonTileValue"); lblDungeonTileValue.AutoSize = true; lblDungeonTileValue.Font = Graphics.FontManager.LoadFont("PMU", 18); lblDungeonTileValue.Text = "Dungeon Tile Value:"; lblDungeonTileValue.Location = new Point(8, 376); nudDungeonTileValue = new NumericUpDown("nudDungeonTileValue"); nudDungeonTileValue.Size = new Size(134, 20); nudDungeonTileValue.Maximum = Int32.MaxValue; nudDungeonTileValue.Font = Graphics.FontManager.LoadFont("PMU", 18); nudDungeonTileValue.Location = new Point(10, 400); #region House Editor Attributes optRoomWarp = new RadioButton("optRoomWarp"); optRoomWarp.BackColor = Color.Transparent; optRoomWarp.Font = Graphics.FontManager.LoadFont("tahoma", 12); optRoomWarp.Location = new Point(115, 6); optRoomWarp.Size = new System.Drawing.Size(95, 17); optRoomWarp.Text = "Warp to Room"; #endregion tempArrayForMobility = new bool[16]; pnlAttributes.AddWidget(optBlocked); pnlAttributes.AddWidget(optWarp); pnlAttributes.AddWidget(optItem); pnlAttributes.AddWidget(optNpcAvoid); pnlAttributes.AddWidget(optKey); pnlAttributes.AddWidget(optKeyOpen); pnlAttributes.AddWidget(optHeal); pnlAttributes.AddWidget(optKill); pnlAttributes.AddWidget(optSound); pnlAttributes.AddWidget(optScripted); pnlAttributes.AddWidget(optNotice); pnlAttributes.AddWidget(optDoor); pnlAttributes.AddWidget(optSign); pnlAttributes.AddWidget(optSpriteChange); pnlAttributes.AddWidget(optShop); pnlAttributes.AddWidget(optArena); pnlAttributes.AddWidget(optBank); pnlAttributes.AddWidget(optGuildBlock); pnlAttributes.AddWidget(optSpriteBlock); pnlAttributes.AddWidget(optMobileBlock); pnlAttributes.AddWidget(optLevelBlock); pnlAttributes.AddWidget(optAssembly); pnlAttributes.AddWidget(optEvolution); pnlAttributes.AddWidget(optStory); pnlAttributes.AddWidget(optLinkShop); pnlAttributes.AddWidget(optMission); pnlAttributes.AddWidget(optScriptedSign); pnlAttributes.AddWidget(optAmbiguous); pnlAttributes.AddWidget(optSlippery); pnlAttributes.AddWidget(optSlow); pnlAttributes.AddWidget(optDropShop); pnlAttributes.AddWidget(lblDungeonTileValue); pnlAttributes.AddWidget(nudDungeonTileValue); #endregion #region Mapping Widgets btnMapping = new Button("btnMapping"); btnMapping.Size = new System.Drawing.Size(100, 30); btnMapping.Location = new Point(0, 0); btnMapping.Font = Graphics.FontManager.LoadFont("PMU.ttf", 24); btnMapping.Text = "Mapping"; btnMapping.MouseHoverDelay = 100; btnMapping.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnMapping_Click); btnMapping.MouseHover += new EventHandler(btnMapping_MouseHover); Skins.SkinManager.LoadButtonGui(btnMapping); pnlMapping = new Panel("pnlMapping"); pnlMapping.Size = new Size(150, 190); pnlMapping.Location = new Point(0, btnMapping.Y + mapEditor_Menu.Y - pnlMapping.Height); pnlMapping.BackColor = Color.White; pnlMapping.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; pnlMapping.SetAutoHide(); btnMapProperties = new Button("btnMapProperties"); btnMapProperties.Size = new System.Drawing.Size(100, 30); btnMapProperties.Location = new Point(DrawingSupport.GetCenter(pnlMapping.Width, btnMapProperties.Width), 10); btnMapProperties.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); btnMapProperties.Text = "Properties"; btnMapProperties.Click += new EventHandler<MouseButtonEventArgs>(btnMapProperties_Click); Skins.SkinManager.LoadButtonGui(btnMapProperties); btnHouseProperties = new Button("btnHouseProperties"); btnHouseProperties.Size = new System.Drawing.Size(100, 30); btnHouseProperties.Location = new Point(DrawingSupport.GetCenter(pnlMapping.Width, btnMapProperties.Width), 10); btnHouseProperties.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); btnHouseProperties.Text = "Music"; btnHouseProperties.Click += new EventHandler<MouseButtonEventArgs>(btnHouseProperties_Click); Skins.SkinManager.LoadButtonGui(btnHouseProperties); btnLoadMap = new Button("btnLoadMap"); btnLoadMap.Size = new System.Drawing.Size(100, 30); btnLoadMap.Location = new Point(DrawingSupport.GetCenter(pnlMapping.Width, btnLoadMap.Width), 40); btnLoadMap.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); btnLoadMap.Text = "Load Map"; btnLoadMap.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnLoadMap_Click); Skins.SkinManager.LoadButtonGui(btnLoadMap); btnSaveMap = new Button("btnSaveMap"); btnSaveMap.Size = new System.Drawing.Size(100, 30); btnSaveMap.Location = new Point(DrawingSupport.GetCenter(pnlMapping.Width, btnSaveMap.Width), 70); btnSaveMap.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); btnSaveMap.Text = "Save Map"; btnSaveMap.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnSaveMap_Click); Skins.SkinManager.LoadButtonGui(btnSaveMap); btnTakeScreenshot = new Button("btnTakeScreenshot"); btnTakeScreenshot.Size = new System.Drawing.Size(100, 30); btnTakeScreenshot.Location = new Point(DrawingSupport.GetCenter(pnlMapping.Width, btnTakeScreenshot.Width), 100); btnTakeScreenshot.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); btnTakeScreenshot.Text = "Take Screenshot"; btnTakeScreenshot.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnTakeScreenshot_Click); Skins.SkinManager.LoadButtonGui(btnTakeScreenshot); btnExit = new Button("btnExit"); btnExit.Size = new System.Drawing.Size(100, 30); btnExit.Location = new Point(DrawingSupport.GetCenter(pnlMapping.Width, btnExit.Width), 130); btnExit.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); btnExit.Text = "Exit"; btnExit.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnExit_Click); Skins.SkinManager.LoadButtonGui(btnExit); pnlMapping.AddWidget(btnMapProperties); pnlMapping.AddWidget(btnHouseProperties); pnlMapping.AddWidget(btnLoadMap); pnlMapping.AddWidget(btnSaveMap); pnlMapping.AddWidget(btnTakeScreenshot); pnlMapping.AddWidget(btnExit); #endregion #region Layer Widgets btnLayers = new Button("btnLayers"); btnLayers.Size = new System.Drawing.Size(100, 30); btnLayers.Location = new Point(100, 0); btnLayers.Font = Graphics.FontManager.LoadFont("PMU.ttf", 24); btnLayers.Text = "Layers"; btnLayers.MouseHoverDelay = 100; btnLayers.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnLayers_Click); btnLayers.MouseHover += new EventHandler(btnLayers_MouseHover); Skins.SkinManager.LoadButtonGui(btnLayers); pnlLayers = new Panel("pnlLayers"); pnlLayers.Size = new Size(350, 100); pnlLayers.Location = new Point(100, btnLayers.Y + mapEditor_Menu.Y - pnlLayers.Height); pnlLayers.BackColor = Color.White; pnlLayers.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; pnlLayers.SetAutoHide(); optGround = new RadioButton("optGround"); optGround.BackColor = Color.Transparent; optGround.Location = new Point(8, 19); optGround.Size = new Size(60, 17); optGround.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); optGround.Text = "Ground"; optGround.Checked = true; optMask = new RadioButton("optMask"); optMask.BackColor = Color.Transparent; optMask.Location = new Point(74, 19); optMask.Size = new Size(51, 17); optMask.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); optMask.Text = "Mask"; optMask2 = new RadioButton("optMask2"); optMask2.BackColor = Color.Transparent; optMask2.Location = new Point(131, 19); optMask2.Size = new Size(60, 17); optMask2.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); optMask2.Text = "Mask 2"; optFringe = new RadioButton("optFringe"); optFringe.BackColor = Color.Transparent; optFringe.Location = new Point(197, 19); optFringe.Size = new Size(54, 17); optFringe.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); optFringe.Text = "Fringe"; optFringe2 = new RadioButton("optFringe2"); optFringe2.BackColor = Color.Transparent; optFringe2.Location = new Point(257, 19); optFringe2.Size = new Size(63, 17); optFringe2.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); optFringe2.Text = "Fringe 2"; chkAnim = new CheckBox("chkAnim"); chkAnim.BackColor = Color.Transparent; chkAnim.Location = new Point(8, 50); chkAnim.Size = new Size(70, 17); chkAnim.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); chkAnim.Text = "Animation"; btnFill = new Button("btnFill"); btnFill.Location = new Point(8, 70); btnFill.Size = new System.Drawing.Size(30, 20); btnFill.Text = "Fill"; btnFill.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); btnFill.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnFill_Click); Skins.SkinManager.LoadButtonGui(btnFill); btnClear = new Button("btnClear"); btnClear.Location = new Point(40, 70); btnClear.Size = new System.Drawing.Size(30, 20); btnClear.Text = "Clear"; btnClear.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8); btnClear.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnClear_Click); Skins.SkinManager.LoadButtonGui(btnClear); btnEyeDropper = new Button("btnEyeDropper"); btnEyeDropper.Location = new Point(72, 70); btnEyeDropper.Size = new System.Drawing.Size(100, 20); btnEyeDropper.Text = "Eye Dropper"; btnEyeDropper.Click += new EventHandler<MouseButtonEventArgs>(btnEyeDropper_Click); Skins.SkinManager.LoadButtonGui(btnEyeDropper); pnlLayers.AddWidget(optGround); pnlLayers.AddWidget(optMask); pnlLayers.AddWidget(optMask2); pnlLayers.AddWidget(optFringe); pnlLayers.AddWidget(optFringe2); pnlLayers.AddWidget(chkAnim); pnlLayers.AddWidget(btnFill); pnlLayers.AddWidget(btnClear); pnlLayers.AddWidget(btnEyeDropper); #endregion #region Tileset Widgets btnTileset = new Button("btnTileset"); btnTileset.Size = new System.Drawing.Size(100, 30); btnTileset.Location = new Point(200, 0); btnTileset.Font = Graphics.FontManager.LoadFont("PMU.ttf", 24); btnTileset.Text = "Tilesets"; btnTileset.MouseHoverDelay = 100; btnTileset.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnTileset_Click); btnTileset.MouseHover += new EventHandler(btnTileset_MouseHover); Skins.SkinManager.LoadButtonGui(btnTileset); pnlTileset = new Panel("pnlTileset"); pnlTileset.Size = new Size(300, 100); pnlTileset.Location = new Point(200, btnTileset.Y + mapEditor_Menu.Y - pnlTileset.Height); pnlTileset.BackColor = Color.White; pnlTileset.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; pnlTileset.SetAutoHide(); hTilesetSelect = new HScrollBar("hTilesetSelect"); hTilesetSelect.Location = new Point(5, 60); hTilesetSelect.Size = new Size(290, 12); hTilesetSelect.Maximum = 10; hTilesetSelect.ValueChanged += new EventHandler<ValueChangedEventArgs>(hTilesetSelect_ValueChanged); lblSelectedTileset = new Label("lblSelectedTileset"); lblSelectedTileset.AutoSize = true; lblSelectedTileset.Location = new Point(5, 75); lblSelectedTileset.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); lblSelectedTileset.Text = "Tileset -1"; btnLoadTileset = new Button("btnLoadTileset"); btnLoadTileset.Size = new System.Drawing.Size(30, 20); btnLoadTileset.Location = new Point(265, 75); btnLoadTileset.Text = "Load"; btnLoadTileset.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnLoadTileset_Click); Skins.SkinManager.LoadButtonGui(btnLoadTileset); picTilesetPreview = new PictureBox[8]; for (int i = 0; i < picTilesetPreview.Length; i++) { picTilesetPreview[i] = new PictureBox("picTilesetPreview" + i); picTilesetPreview[i].Location = new Point(5 + (i * 37), 10); picTilesetPreview[i].Size = new System.Drawing.Size(32, 32); picTilesetPreview[i].BackColor = Color.White; picTilesetPreview[i].BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; } pnlTileset.AddWidget(hTilesetSelect); pnlTileset.AddWidget(lblSelectedTileset); pnlTileset.AddWidget(btnLoadTileset); for (int i = 0; i < picTilesetPreview.Length; i++) { pnlTileset.AddWidget(picTilesetPreview[i]); } #endregion #region Settings Widgets btnSettings = new Button("btnSettings"); btnSettings.Size = new System.Drawing.Size(100, 30); btnSettings.Location = new Point(300, 0); btnSettings.Font = Graphics.FontManager.LoadFont("PMU.ttf", 24); btnSettings.Text = "Settings"; btnSettings.MouseHoverDelay = 100; btnSettings.Click += new EventHandler<SdlDotNet.Widgets.MouseButtonEventArgs>(btnSettings_Click); btnSettings.MouseHover += new EventHandler(btnSettings_MouseHover); Skins.SkinManager.LoadButtonGui(btnSettings); pnlSettings = new Panel("pnlOptions"); pnlSettings.Size = new Size(200, 200); pnlSettings.Location = new Point(300, btnSettings.Y + mapEditor_Menu.Y - pnlSettings.Height); pnlSettings.BackColor = Color.White; pnlSettings.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle; pnlSettings.SetAutoHide(); lblDisplaySettings = new Label("lblDisplaySettings"); lblDisplaySettings.AutoSize = true; lblDisplaySettings.Location = new Point(5, 5); lblDisplaySettings.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 12); lblDisplaySettings.Text = "Display Settings"; chkDisplayMapGrid = new CheckBox("chkDisplayMapGrid"); chkDisplayMapGrid.Location = new Point(5, 25); chkDisplayMapGrid.Size = new System.Drawing.Size(125, 17); chkDisplayMapGrid.BackColor = Color.Transparent; chkDisplayMapGrid.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); chkDisplayMapGrid.Text = "Map Grid"; chkDisplayMapGrid.Checked = IO.Options.MapGrid; chkDisplayMapGrid.CheckChanged += new EventHandler(chkDisplayMapGrid_CheckChanged); chkDisplayAttributes = new CheckBox("chkDisplayAttributes"); chkDisplayAttributes.Location = new Point(5, 45); chkDisplayAttributes.Size = new System.Drawing.Size(125, 17); chkDisplayAttributes.BackColor = Color.Transparent; chkDisplayAttributes.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); chkDisplayAttributes.Text = "Attributes"; chkDisplayAttributes.Checked = IO.Options.DisplayAttributes; chkDisplayAttributes.CheckChanged += new EventHandler(chkDisplayAttributes_CheckChanged); chkDisplayDungeonValues = new CheckBox("chkDisplayDungeonValues"); chkDisplayDungeonValues.Location = new Point(5, 65); chkDisplayDungeonValues.Size = new System.Drawing.Size(125, 17); chkDisplayDungeonValues.BackColor = Color.Transparent; chkDisplayDungeonValues.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); chkDisplayDungeonValues.Text = "DungeonValues"; chkDisplayDungeonValues.Checked = IO.Options.DisplayDungeonValues; chkDisplayDungeonValues.CheckChanged += new EventHandler(chkDisplayDungeonValues_CheckChanged); lblMappingSettings = new Label("lblMappingSettings"); lblMappingSettings.AutoSize = true; lblMappingSettings.Location = new Point(5, 85); lblMappingSettings.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 12); lblMappingSettings.Text = "Mapping Settings"; chkDragAndPlace = new CheckBox("chkDragAndPlace"); chkDragAndPlace.Location = new Point(5, 105); chkDragAndPlace.Size = new System.Drawing.Size(125, 17); chkDragAndPlace.BackColor = Color.Transparent; chkDragAndPlace.Font = Graphics.FontManager.LoadFont("tahoma.ttf", 10); chkDragAndPlace.Text = "Drag and Place"; chkDragAndPlace.Checked = IO.Options.DragAndPlace; chkDragAndPlace.CheckChanged += new EventHandler(chkDragAndPlace_CheckChanged); pnlSettings.AddWidget(lblDisplaySettings); pnlSettings.AddWidget(chkDisplayMapGrid); pnlSettings.AddWidget(chkDisplayAttributes); pnlSettings.AddWidget(chkDisplayDungeonValues); pnlSettings.AddWidget(lblMappingSettings); pnlSettings.AddWidget(chkDragAndPlace); #endregion Screen.AddWidget(tilesetViewer); Screen.AddWidget(btnTerrain); Screen.AddWidget(btnAttributes); Screen.AddWidget(btnOK); //this.AddWidget(btnBack); Screen.AddWidget(pnlAttributes); Screen.AddWidget(pnlAttOptions); mapEditor_Menu.AddWidget(btnMapping); Screen.AddWidget(pnlMapping); mapEditor_Menu.AddWidget(btnLayers); Screen.AddWidget(pnlLayers); mapEditor_Menu.AddWidget(btnTileset); Screen.AddWidget(pnlTileset); mapEditor_Menu.AddWidget(btnSettings); Screen.AddWidget(pnlSettings); mapEditor_Menu.Visible = false; Screen.AddWidget(mapEditor_Menu); hTilesetSelect_ValueChanged(hTilesetSelect, new ValueChangedEventArgs(0, 0)); }