public Inventory() { Resizable = true; Size = new Point(400, 300); Position = new Point(400, 200); Titlebar.Text = "Inventory"; left = new Frame(); left.Size = new Point(50, 50); left.Dock = DockStyle.Left; left.Style = "window"; Controls.Add(left); for (int i = 0; i < 6; i++) { ActionButton slot = new ActionButton(); slot.Size = new Point(40, 40); slot.Dock = DockStyle.Top; slot.Margin = new Squid.Margin(5, 5, 5, 0); left.Controls.Add(slot); } top = new Frame(); top.Size = new Point(58, 58); top.Dock = DockStyle.Top; Controls.Add(top); search = new TextBox(); search.Size = new Point(200, 28); search.Dock = DockStyle.Bottom; search.Style = "textbox"; search.Text = "Search..."; search.Margin = new Squid.Margin(8, 0, 8, 0); search.GotFocus += delegate(Control sender) { search.Text = ""; }; search.LostFocus += delegate(Control sender) { search.Text = "Search..."; }; top.Controls.Add(search); bottom = new Frame(); bottom.Size = new Point(38, 38); bottom.Dock = DockStyle.Bottom; bottom.Style = "border"; bottom.Margin = new Squid.Margin(-1, 0, 0, 0); Controls.Add(bottom); view = new ScrollView(); view.Dock = DockStyle.Fill; view.AllowDrop = true; Controls.Add(view); flow = new FlowLayoutFrame(); flow.FlowDirection = FlowDirection.LeftToRight; flow.HSpacing = flow.VSpacing = 4; flow.AutoSize = Squid.AutoSize.Vertical; flow.Dock = DockStyle.Top; view.Controls.Add(flow); Refresh(); }
public CharacterSheet() { Resizable = true; Size = new Point(400, 300); Position = new Point(100, 100); Titlebar.Text = "Character"; split = new SplitContainer(); split.Dock = DockStyle.Fill; Controls.Add(split); stats = new ScrollView(); stats.Dock = DockStyle.Fill; split.SplitFrame1.Controls.Add(stats); paperdoll = new Frame(); paperdoll.Dock = DockStyle.Fill; split.SplitFrame2.Controls.Add(paperdoll); ImageControl image = new ImageControl { Texture = "paperdoll.jpg" }; image.Dock = DockStyle.Fill; paperdoll.Controls.Add(image); //top = new Frame { Size = new Point(44, 44), Dock = DockStyle.Top }; paperdoll.Controls.Add(top); //bottom = new Frame { Size = new Point(44, 44), Dock = DockStyle.Bottom }; paperdoll.Controls.Add(bottom); left = new Frame { Size = new Point(44, 44), Dock = DockStyle.Left }; paperdoll.Controls.Add(left); right = new Frame { Size = new Point(44, 44), Dock = DockStyle.Right }; paperdoll.Controls.Add(right); int i = 0; foreach (KeyValuePair<ItemSlotType, ItemSlot> pair in GameLogic.Player.ItemSlots) { ActionButton button = new ActionButton(); button.Size = new Point(40, 40); button.Style = "button"; button.Dock = DockStyle.Top; button.Margin = new Squid.Margin(2); button.AllowDrop = true; button.DragDrop += button_DragDrop; button.Tooltip = pair.Key.ToString(); button.Tag = pair.Value; if (i < 6) left.Controls.Add(button); else right.Controls.Add(button); i++; } }
public Skillbook() { Resizable = true; Size = new Point(400, 300); Position = new Point(400, 200); Titlebar.Text = "Skills"; view = new ScrollView(); view.Dock = DockStyle.Fill; Controls.Add(view); flow = new FlowLayoutFrame(); flow.FlowDirection = FlowDirection.LeftToRight; flow.HSpacing = flow.VSpacing = 4; flow.AutoSize = Squid.AutoSize.Vertical; flow.Dock = DockStyle.Top; view.Controls.Add(flow); Refresh(); }