Beispiel #1
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);
        }
Beispiel #2
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);
        }
Beispiel #3
0
        public MainScreen(IDictionary<Type, object> managers)
            : base(managers)
        {
            _background = ResourceManager.GetSprite("mainbg_filler");
            _background.Smoothing = Smoothing.Smooth;

            _buttConnect = new ImageButton
                               {
                                   ImageNormal = "connect_norm",
                                   ImageHover = "connect_hover"
                               };
            _buttConnect.Clicked += _buttConnect_Clicked;

            _buttOptions = new ImageButton
                               {
                                   ImageNormal = "options_norm",
                                   ImageHover = "options_hover"
                               };
            _buttOptions.Clicked += _buttOptions_Clicked;

            _buttExit = new ImageButton
                            {
                                ImageNormal = "exit_norm",
                                ImageHover = "exit_hover"
                            };
            _buttExit.Clicked += _buttExit_Clicked;

            _connectTextbox = new Textbox(100, ResourceManager) {Text = ConfigurationManager.GetServerAddress()};
            _connectTextbox.OnSubmit += ConnectTextboxOnSubmit;
            _connectTextbox.SetVisible(false);

            Assembly assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);

            _lblVersion = new Label("v. " + fvi.FileVersion, "CALIBRI", ResourceManager);
            _lblVersion.Text.Color = Color.WhiteSmoke;
            _lblVersion.Position = new Point(Gorgon.Screen.Width - _lblVersion.ClientArea.Width - 3,
                                             Gorgon.Screen.Height - _lblVersion.ClientArea.Height - 3);

            _titleImage = new SimpleImage
                              {
                                  Sprite = "SpaceStationLogoColor",
                                  Position = new Point(Gorgon.Screen.Width - 550, 100)
                              };
        }
Beispiel #4
0
        public Lobby(IDictionary<Type, object> managers)
            : base(managers)
        {
            _background = ResourceManager.GetSprite("mainbg");
            _background.Smoothing = Smoothing.Smooth;

            _mainbg = 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)
                        };

            _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 Vector2D(780,225),
                };

            _lobbyChat.Update(0);

            _imgChatBg = new SimpleImage()
            {
                Sprite = "lobby_chatbg",
            };

            _lobbyChat.TextSubmitted += new Chatbox.TextSubmitHandler(_lobbyChat_TextSubmitted);

        }
Beispiel #5
0
        public JobTab(string uniqueName, Size size, IResourceManager resourceManager)
            : base(uniqueName, size, resourceManager)
        {
            _bttReady = new ImageButton()
            {
                ImageNormal  = "lobby_ready",
                ImageHover   = "lobby_ready_green",
                BlendingMode = BlendingModes.None
            };
            _bttReady.Clicked += _bttReady_Clicked;
            _bttReady.Update(0);

            _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);

            _bttReady.Position = new Point(ClientArea.Width - _bttReady.ClientArea.Width - 5, _imgJobDesc.ClientArea.Bottom + 4);

            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);
            components.Add(_bttReady);
        }
Beispiel #6
0
        public JobTab(string uniqueName, Size size, IResourceManager resourceManager)
            : base(uniqueName, size, resourceManager)
        {
            _bttReady = new ImageButton()
                {
                    ImageNormal = "lobby_ready",
                    ImageHover = "lobby_ready_green",
                    BlendingMode = BlendingModes.None
                };
            _bttReady.Clicked += _bttReady_Clicked;
            _bttReady.Update(0);

            _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);

            _bttReady.Position = new Point(ClientArea.Width - _bttReady.ClientArea.Width - 5, _imgJobDesc.ClientArea.Bottom + 4);

            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);
            components.Add(_bttReady);
        }