public Showcase() { _resourceManager = IoCManager.Resolve<IResourceManager>(); _buttonLeft = new ImageButton(); _buttonLeft.Clicked += _buttonLeft_Clicked; _buttonRight = new ImageButton(); _buttonRight.Clicked += _buttonRight_Clicked; _selectionGlow = new SimpleImage(); Update(0); }
public bool ShowArrows = true; //Show side arrows? public Showcase() { _resourceManager = IoCManager.Resolve <IResourceManager>(); _buttonLeft = new ImageButton(); _buttonLeft.Clicked += _buttonLeft_Clicked; _buttonRight = new ImageButton(); _buttonRight.Clicked += _buttonRight_Clicked; _selectionGlow = new SimpleImage(); Update(0); }
public MainScreen(IDictionary<Type, object> managers) : base(managers) { _Width = (int) CluwneLib.Screen.Size.X; _Height = (int) CluwneLib.Screen.Size.Y; _background = ResourceManager.GetSprite("coderart"); _btnConnect = new ImageButton { ImageNormal = "connect_norm", ImageHover = "connect_hover" }; _btnConnect.Clicked += _buttConnect_Clicked; _btnOptions = new ImageButton { ImageNormal = "options_norm", ImageHover = "options_hover" }; _btnOptions.Clicked += _buttOptions_Clicked; _btnExit = new ImageButton { ImageNormal = "exit_norm", ImageHover = "exit_hover" }; _btnExit.Clicked += _buttExit_Clicked; _txtConnect = new Textbox(100, ResourceManager) {Text = ConfigurationManager.GetServerAddress()}; _txtConnect.Position = new Vector2i(_Width / 3, _Height / 2); _txtConnect.OnSubmit += ConnectTextboxOnSubmit; Assembly assembly = Assembly.GetExecutingAssembly(); FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); _lblVersion = new Label("v. " + fvi.FileVersion, "CALIBRI", ResourceManager); _lblVersion.Text.Color = new SFML.Graphics.Color(245, 245, 245); _lblVersion.Position = new Vector2i(_Width - _lblVersion.ClientArea.Width - 3, _Height - _lblVersion.ClientArea.Height - 3); _imgTitle = new SimpleImage { Sprite = "SpaceStationLogoColor", Position = new Vector2i(_Width-550, 100), }; _lblVersion.Update(0); _imgTitle.Update(0); _txtConnect.Position = new Vector2i(_imgTitle.ClientArea.Left + 40, _imgTitle.ClientArea.Bottom() + 50); _txtConnect.Update(0); _btnConnect.Position = new Vector2i(_txtConnect.Position.X, _txtConnect.ClientArea.Bottom() + 20); _btnConnect.Update(0); _btnOptions.Position = new Vector2i(_btnConnect.Position.X, _btnConnect.ClientArea.Bottom() + 20); _btnOptions.Update(0); _btnExit.Position = new Vector2i(_btnOptions.Position.X, _btnOptions.ClientArea.Bottom() + 20); _btnExit.Update(0); }
public JobTab(string uniqueName, Size size, IResourceManager resourceManager) : base(uniqueName, size, resourceManager) { _imgWhatDep = new SimpleImage() { Sprite = "lobby_whatdep" }; _imgWhatDep.Update(0); _imgWhatDep.Position = new Point((int)(size.Width / 2f - _imgWhatDep.ClientArea.Width / 2f), 30); _imgWhatDep.Update(0); _imgJobDesc = new SimpleImage() { Sprite = "lobby_descbg" }; _shwDepa = new LobbyShowcase { Position = new Point(60, _imgWhatDep.ClientArea.Bottom + 5), Size = new Size(675, 80), ButtonLeft = "job_arrowleft", ButtonRight = "job_arrowright", SelectionBackground = "dep_glow", ItemSpacing = 20, //ItemOffsets = new Size(40, 0) }; _shwDepa.Update(0); _imgDepGrad = new SimpleImage() { Sprite = "lobby_depgrad", Color = Color.FromArgb(120, Color.White), // BlendingMode = BlendingModes.None }; _imgDepGrad.Update(0); _imgDepGrad.Position = new Point(_shwDepa.ClientArea.X + (int)(_shwDepa.ClientArea.Width / 2f - _imgDepGrad.ClientArea.Width / 2f), _shwDepa.ClientArea.Top); _lblDep = new Label("DEPARTMENT", "MICROGBE", resourceManager) { BackgroundColor = Color.WhiteSmoke, DrawBackground = true, TextColor = Color.FromArgb(53, 57, 66) }; _lblDep.Update(0); _lblDep.Position = new Point((int)(size.Width / 2f - _lblDep.ClientArea.Width / 2f), _shwDepa.ClientArea.Bottom + 5); _lblDep.Update(0); _imgJobFluff = new SimpleImage() { Sprite = "lobby_jobfluff" }; _imgJobFluff.Position = new Point(_lblDep.ClientArea.X + (int)(_lblDep.ClientArea.Width / 2f - _imgJobFluff.ClientArea.Width / 2f), _lblDep.ClientArea.Bottom); _shwJobs = new LobbyShowcase { Position = new Point(60, _lblDep.ClientArea.Bottom + 25), Size = new Size(675, 80), ButtonLeft = "job_arrowleft", ButtonRight = "job_arrowright", SelectionBackground = "job_glow" }; _shwJobs.Update(0); _imgJobGrad = new SimpleImage() { Sprite = "lobby_jobgrad", Color = Color.FromArgb(120, Color.White), // BlendingMode = BlendingModes.None }; _imgJobGrad.Update(0); _imgJobGrad.Position = new Point(_shwJobs.ClientArea.X + (int)(_shwJobs.ClientArea.Width / 2f - _imgJobGrad.ClientArea.Width / 2f), _shwJobs.ClientArea.Top); _imgJobDesc.Update(0); _imgJobDesc.Position = new Point(0, _shwJobs.ClientArea.Bottom - 12); _imgJobDesc.Update(0); _lbljobName = new Label(" ", "MICROGBE", resourceManager) { TextColor = Color.WhiteSmoke }; _lbljobName.Position = new Point(3, _imgJobDesc.Position.Y + 4); _lbljobName.Update(0); _lbljobDesc = new Label(" ", "MICROGME", resourceManager) { TextColor = Color.WhiteSmoke }; _lbljobDesc.Position = new Point(3, _lbljobName.ClientArea.Bottom + 5); components.Add(_lblDep); components.Add(_imgWhatDep); components.Add(_imgDepGrad); components.Add(_shwDepa); components.Add(_imgJobGrad); components.Add(_shwJobs); components.Add(_imgJobFluff); components.Add(_imgJobDesc); components.Add(_lbljobDesc); components.Add(_lbljobName); }
public Lobby(IDictionary<Type, object> managers) : base(managers) { _background = ResourceManager.GetSprite("mainbg"); _background.Smoothing = true; _imgMainBg = new SimpleImage { Sprite = "lobby_mainbg" }; _imgStatus = new SimpleImage { Sprite = "lobby_statusbar" }; _lblServer = new Label("SERVER:", "MICROGME", ResourceManager); _lblServer.Text.Color = Color.WhiteSmoke; _serverLabels.Add(_lblServer); _lblServerInfo = new Label("LLJK#1", "MICROGME", ResourceManager); _lblServerInfo.Text.Color = Color.DarkRed; _serverLabels.Add(_lblServerInfo); _lblMode = new Label("GAMEMODE:", "MICROGME", ResourceManager); _lblMode.Text.Color = Color.WhiteSmoke; _serverLabels.Add(_lblMode); _lblModeInfo = new Label("SECRET", "MICROGME", ResourceManager); _lblModeInfo.Text.Color = Color.DarkRed; _serverLabels.Add(_lblModeInfo); _lblPlayers = new Label("PLAYERS:", "MICROGME", ResourceManager); _lblPlayers.Text.Color = Color.WhiteSmoke; _serverLabels.Add(_lblPlayers); _lblPlayersInfo = new Label("17/32", "MICROGME", ResourceManager); _lblPlayersInfo.Text.Color = Color.DarkRed; _serverLabels.Add(_lblPlayersInfo); _lblPort = new Label("PORT:", "MICROGME", ResourceManager); _lblPort.Text.Color = Color.WhiteSmoke; _serverLabels.Add(_lblPort); _lblPortInfo = new Label("1212", "MICROGME", ResourceManager); _lblPortInfo.Text.Color = Color.DarkRed; _serverLabels.Add(_lblPortInfo); _tabs = new TabbedMenu { TopSprite = "lobby_tab_top", MidSprite = "lobby_tab_mid", BotSprite = "lobby_tab_bot", TabOffset = new Point(-8, 300), ZDepth = 2 }; _tabJob = new JobTab("lobbyTabJob", new Size(793, 450), ResourceManager) { tabSpriteName = "lobby_tab_bcase" }; _tabs.AddTab(_tabJob); _tabJob._shwDepa.SelectionChanged += new Showcase.ShowcaseSelectionChangedHandler(_shwDepa_SelectionChanged); _tabJob._shwJobs.SelectionChanged += new Showcase.ShowcaseSelectionChangedHandler(_shwJobs_SelectionChanged); _tabCharacter = new TabContainer("lobbyTabCharacter", new Size(793, 450), ResourceManager) { tabSpriteName = "lobby_tab_person" }; _tabs.AddTab(_tabCharacter); _tabObserve = new TabContainer("lobbyTabObserve", new Size(793, 450), ResourceManager) { tabSpriteName = "lobby_tab_eye" }; _tabs.AddTab(_tabObserve); _tabServer = new PlayerListTab("lobbyTabServer", new Size(793, 450), ResourceManager) { tabSpriteName = "lobby_tab_info" }; _tabs.AddTab(_tabServer); _tabs.SelectTab(_tabJob); _lobbyChat = new Chatbox(ResourceManager, UserInterfaceManager, KeyBindingManager) { Size = new Vector2(780,225), }; _lobbyChat.Update(0); _imgChatBg = new SimpleImage() { Sprite = "lobby_chatbg", }; _lobbyChat.TextSubmitted += new Chatbox.TextSubmitHandler(_lobbyChat_TextSubmitted); _btnReady = new ImageButton() { ImageNormal = "lobby_ready", ImageHover = "lobby_ready_green", //BlendingMode = BlendingModes.None, ZDepth = 1 }; _btnReady.Clicked += _btnReady_Clicked; _btnReady.Update(0); _lblServerInfo.FixedWidth = 100; _lblModeInfo.FixedWidth = 90; _lblPlayersInfo.FixedWidth = 60; _lblPortInfo.FixedWidth = 50; UpdateGUIPosition(); }
public JobTab(string uniqueName, Vector2i size, IResourceManager resourceManager) : base(uniqueName, size, resourceManager) { _imgWhatDep = new SimpleImage() { Sprite = "lobby_whatdep" }; _imgWhatDep.Update(0); _imgWhatDep.Position = new Vector2i((int)(size.X / 2f - _imgWhatDep.ClientArea.Width / 2f), 30); _imgWhatDep.Update(0); _imgJobDesc = new SimpleImage() { Sprite = "lobby_descbg" }; _shwDepa = new LobbyShowcase { Position = new Vector2i(60, _imgWhatDep.ClientArea.Bottom() + 5), Size = new Vector2i(675, 80), ButtonLeft = "job_arrowleft", ButtonRight = "job_arrowright", SelectionBackground = "dep_glow", ItemSpacing = 20, //ItemOffsets = new Vector2i(40, 0) }; _shwDepa.Update(0); _imgDepGrad = new SimpleImage() { Sprite = "lobby_depgrad", Color = Color.White.WithAlpha(120) }; _imgDepGrad.Update(0); _imgDepGrad.Position = new Vector2i(_shwDepa.ClientArea.Left + (int)(_shwDepa.ClientArea.Width / 2f - _imgDepGrad.ClientArea.Width / 2f), _shwDepa.ClientArea.Top); _lblDep = new Label("DEPARTMENT", "MICROGBE", resourceManager) { BackgroundColor = new Color(245, 245, 245), DrawBackground = true, TextColor = new Color(53,57,66) }; _lblDep.Update(0); _lblDep.Position = new Vector2i((int)(size.X / 2f - _lblDep.ClientArea.Width / 2f), _shwDepa.ClientArea.Bottom() + 5); _lblDep.Update(0); _imgJobFluff = new SimpleImage() { Sprite = "lobby_jobfluff" }; _imgJobFluff.Position = new Vector2i(_lblDep.ClientArea.Left + (int)(_lblDep.ClientArea.Width / 2f - _imgJobFluff.ClientArea.Width / 2f), _lblDep.ClientArea.Bottom()); _shwJobs = new LobbyShowcase { Position = new Vector2i(60, _lblDep.ClientArea.Bottom() + 25), Size = new Vector2i(675, 80), ButtonLeft = "job_arrowleft", ButtonRight = "job_arrowright", SelectionBackground = "job_glow" }; _shwJobs.Update(0); _imgJobGrad = new SimpleImage() { Sprite = "lobby_jobgrad", Color = Color.White.WithAlpha(120) }; _imgJobGrad.Update(0); _imgJobGrad.Position = new Vector2i(_shwJobs.ClientArea.Left + (int)(_shwJobs.ClientArea.Width / 2f - _imgJobGrad.ClientArea.Width / 2f), _shwJobs.ClientArea.Top); _imgJobDesc.Update(0); _imgJobDesc.Position = new Vector2i(0, _shwJobs.ClientArea.Bottom() - 12); _imgJobDesc.Update(0); _lbljobName = new Label(" ", "MICROGBE", resourceManager) { TextColor = new Color(245, 245, 245) }; _lbljobName.Position = new Vector2i(3, _imgJobDesc.Position.Y + 4); _lbljobName.Update(0); _lbljobDesc = new Label(" ", "MICROGME", resourceManager) { TextColor = new Color(245, 245, 245) }; _lbljobDesc.Position = new Vector2i(3, _lbljobName.ClientArea.Bottom() + 5); components.Add(_lblDep); components.Add(_imgWhatDep); components.Add(_imgDepGrad); components.Add(_shwDepa); components.Add(_imgJobGrad); components.Add(_shwJobs); components.Add(_imgJobFluff); components.Add(_imgJobDesc); components.Add(_lbljobDesc); components.Add(_lbljobName); }