예제 #1
0
        //TODO: Ghost furni depth
        internal void DisplayGhostItem(Furni furni)
        {
            try
            {
                GameScreenManager.Instance.GetInventoryManager().Close();

                ghostMeubi = new GhostMeubi(_content, furni.GetItemId(), furni.GetSpriteId(),
                                            () => { ghostMeubi = null; GameScreenManager.Instance.GetInventoryManager().Open(); },
                                            () => { RetroEnvironment.GetGame().GetClientManager().SendPacket(new PlaceObjectEvent(ghostMeubi.GetItemId(), floorDesign.GetMouseTile(roomOffset).GetCoordinate().X, floorDesign.GetMouseTile(roomOffset).GetCoordinate().Z, ghostMeubi.GetRotation())); });
                placeDelay.Start();
            }
            catch (Exception ex)
            {
                if (furni == null)
                {
                    Logger.Error("Ghost Furni does not exist!");
                }
                else if (roomOffset == null)
                {
                    Logger.Error("Room offset does not exist!");
                }
                else
                {
                    Logger.Error(ex);
                }
            }
        }
예제 #2
0
        public void Initialize(ContentManager content, string searchCode)
        {
            SectionCombiner combiner = new SectionCombiner();
            GameClient      session  = RetroEnvironment.GetGame().GetClientManager().GetClientByUserID(GameScreenManager.Instance.ClientID);

            identifyers = session.GetCategorysByIdentifyer(searchCode).ToArray();

            navSections   = new NavRoomSection[identifyers.Length];
            this.sections = navSections.ToList();

            Vector2i offset = new Vector2i();

            for (int i = 0; i < identifyers.Length; i++)
            {
                int bodySize = 0;
                navSections[i] = new NavRoomSection(content, identifyers[i], offset, new Vector2i(view.GetViewSize().X, 29), out bodySize);
                offset        += new Vector2i(0, navSections[i].GetSize().Y + 5);
                if (!identifyers[i].isCollapsed)
                {
                    offset += new Vector2i(0, bodySize);
                }
            }

            view.SetContent(combiner.AddSections(navSections).GetImages());
            view.SetText(combiner.AddSections(navSections).GetFonts());
            isInitialized = true;
        }
예제 #3
0
 internal void SetMoveGhostItem(Meubi meubi)
 {
     meubi.Hide();
     ghostMeubi = new GhostMeubi(_content, meubi.GetItemId(), meubi.GetData().id,
                                 () => { ghostMeubi = null; meubi.Show(); },
                                 () => { RetroEnvironment.GetGame().GetClientManager().SendPacket(new MoveObjectEvent(ghostMeubi.GetItemId(), (int)floorDesign.GetMouseTile(roomOffset).GetCoordinate().X, (int)floorDesign.GetMouseTile(roomOffset).GetCoordinate().Z, ghostMeubi.GetRotation())); ghostMeubi = null; });
     placeDelay.Start();
 }
예제 #4
0
        public FurniManager(ContentManager content)
        {
            minimiumSize = new Vector2i(190, 160);
            size         = minimiumSize;

            buyOne    = false;
            hasRights = false;

            selectedItem = null;
            baseItems    = new Dictionary <int, BaseItem>();

            delay          = new System.Timers.Timer(200);
            delay.Elapsed += Delay_Elapsed;

            useBtn    = new HoverButton(content, "Menu/Furni/button", new Vector2i(3, 1), () => { SelectItem(selectedItem); }, Color.White);
            pickupBtn = new HoverButton(content, "Menu/Furni/button", new Vector2i(3, 1),
                                        () => {
                RetroEnvironment.GetGame().GetClientManager().SendPacket(new PickupObjectEvent(selectedItem.GetItemId()));
                SelectItem(null);
            }, Color.White);
            rotateBtn = new HoverButton(content, "Menu/Furni/button", new Vector2i(3, 1),
                                        () => {
                SelectItem(selectedItem);
                RetroEnvironment.GetGame().GetClientManager().SendPacket(new MoveObjectEvent(selectedItem.GetItemId(), (int)selectedItem.GetCoordinate().X, (int)selectedItem.GetCoordinate().Z, (selectedItem.GetRotation() * 2) + 2));
            }, Color.White);
            moveBtn = new HoverButton(content, "Menu/Furni/button", new Vector2i(3, 1),
                                      () => {
                GameScreenManager.Instance.GetRoomManager().SetMoveGhostItem(selectedItem);
                SelectItem(null);
            }, Color.White);

            close = new Button(content, "Menu/Furni/close", new Vector2i(1, 1), () => { SelectItem(null); });

            crnLT = new Image(content, "Menu/Furni/crn", Vector2.Zero, 1, 0, SpriteEffects.None);
            crnLB = new Image(content, "Menu/Furni/crnB", Vector2.Zero, 1, 0, SpriteEffects.None);
            crnRT = new Image(content, "Menu/Furni/crn", Vector2.Zero, 1, 0, SpriteEffects.FlipHorizontally);
            crnRB = new Image(content, "Menu/Furni/crnB", Vector2.Zero, 1, 0, SpriteEffects.FlipHorizontally);

            edgeT       = new Image(content, "Menu/Furni/backdrop", new Vector2(minimiumSize.X - (2 * crnLT.SourceRect.Width), 6));
            edgeB       = new Image(content, "Menu/Furni/backdrop", new Vector2(minimiumSize.X - (2 * crnLT.SourceRect.Width), 6));
            backdrop    = new Image(content, "Menu/Furni/backdrop", new Vector2(minimiumSize.X, minimiumSize.Y - (2 * edgeT.SourceRect.Height)));
            divider1    = new Image(content, "Menu/Furni/divider", new Vector2(minimiumSize.X - 20, 1));
            userProfile = new Image(content, "Menu/Furni/user", Vector2.Zero);
            divider2    = divider1.Clone() as Image;
            divider3    = divider1.Clone() as Image;

            titleFnt = new Font(content, "Fonts/Furni/title", "N/A", Color.White);
            descFnt  = new Font(content, "Fonts/Furni/desc", "N/A", Color.White);
            userFnt  = new Font(content, "Fonts/Furni/user", "N/A", Color.White);

            useFnt    = new Font(content, "Fonts/Furni/button", "furni.button.use", Color.White);
            pickupFnt = new Font(content, "Fonts/Furni/button", "furni.button.remove", Color.White);
            rotateFnt = new Font(content, "Fonts/Furni/button", "furni.button.rotate", Color.White);
            moveFnt   = new Font(content, "Fonts/Furni/button", "furni.button.move", Color.White);
        }
예제 #5
0
 public void ToggleCatalogus()
 {
     if (Catalogus.isOpen())
     {
         Catalogus.Close();
     }
     else
     {
         RetroEnvironment.GetGame().GetClientManager().SendPacket(new GetCatalogIndexEvent());
     }
 }
예제 #6
0
        public void EnterRoom(int roomId, int acceslevel, string passowrd)
        {
            if (acceslevel == 0)
            {
                ExitRoom();

                //foreach (KeyValuePair<Coordinate, Tile> pair in tiles)
                //    cleanUps.Add(pair.Key, pair.Value);
                meubis.Clear();

                RetroEnvironment.GetGame().GetClientManager().SendPacket(new OpenFlatConnectionEvent(roomId, ""));
            }
        }
예제 #7
0
        public CatalogusContent(ContentManager content, Vector2i position, Vector2i size, int offsetX = 0, int offsetY = 0) : base(content, position, size, "Catalogus", offsetX, offsetY)
        {
            rootContainer = new TopButtonsContainer(content);
            voucherButton = new HoverConstructedButton(content, () => { RetroEnvironment.GetGame().GetClientManager().SendPacket(new RedeemVoucherEvent("Test")); }, new Vector2i(67, 22),
                                                       HoverConstructedButtonType.BASIC1,
                                                       new Color [] { new Color(243, 243, 243), new Color(225, 225, 225), new Color(255, 255, 255) },
                                                       new Color[] { new Color(217, 217, 217), new Color(163, 163, 163), new Color(238, 238, 238) },
                                                       "catalogue.voucher.button");

            textField = new TextField(content, "Fonts/Arial", new Rectangle(50, 50, 216, 25), GameScreenManager.Instance.GraphicsDevice);
            textField.SetEdgeColor(new Color(32, 74, 95));

            imgBannerLayer  = new Image(content, "catalogue/bannerLayer", Vector2.Zero);
            voucherBackdrop = new Image(content, "catalogue/voucher", Vector2.Zero);

            pageTree  = new ScrollView(content, new Vector2i(0, 0), new Vector2i(159, 424), "menu/Catalogus/backdrop", null);
            pageItems = new ScrollView(content, new Vector2i(0, 0), new Vector2i(335, 146), "menu/Catalogus/backdrop", null);

            tree           = new CataBox(content, new Vector2i(184, 433));
            items          = new CataBox(content, new Vector2i(360, 155));
            selectItem     = new CataBox(content, new Vector2i(360, 30));
            selectItemText = new Font(content, "Fonts/Catalogus/NoItemSelected", "catalogus.page.noitemselected", new Color(102, 102, 102));

            present = new HoverConstructedButton(content, () => { Logger.Error("Send User Message of that inplemented"); }, new Vector2i(170, 24),
                                                 HoverConstructedButtonType.BASIC1,
                                                 new Color[] { new Color(243, 243, 243), new Color(225, 225, 225), new Color(255, 255, 255) },
                                                 new Color[] { new Color(217, 217, 217), new Color(163, 163, 163), new Color(238, 238, 238) },
                                                 "catalogue.item.button.present", "Fonts/Catalogus/PresentButton");

            buy = new HoverConstructedButton(content, () => { RetroEnvironment.GetGame().GetClientManager().SendPacket(new PurchaseFromCatalogEvent(GameScreenManager.Instance.GetCatalogusManager().GetActivePage(), GameScreenManager.Instance.GetCatalogusManager().GetSelectedItem().GetItemId(), GameScreenManager.Instance.GetCatalogusManager().GetSelectedItem().ExtraData(), 10)); }, new Vector2i(170, 24),
                                             HoverConstructedButtonType.GREEN,
                                             new Color[] { new Color(0, 161, 0), new Color(0, 161, 0), new Color(0, 161, 0) },
                                             new Color[] { new Color(0, 144, 0), new Color(0, 144, 0), new Color(0, 144, 0) },
                                             "catalogue.item.button.buy", "Fonts/Catalogus/BuyButton");

            presentDisabled     = new Image(content, "Menu/Catalogus/Extras/presentDisabled", Vector2.Zero);
            presentDisabledText = new Font(content, "Fonts/Catalogus/PresentButton", "catalogue.item.button.present", new Color(163, 163, 163));

            Amount = new Font(content, "Fonts/Catalogus/ItemDetails", "catalogue.item.details.amount", new Color(106, 106, 106));
            Price  = new Font(content, "Fonts/Catalogus/ItemDetails", "catalogue.item.details.price", new Color(106, 106, 106));

            priceOneText = new Font(content, "Fonts/Catalogus/CurrencyTitle", "0", new Color(11, 11, 11));
            priceTwoText = new Font(content, "Fonts/Catalogus/CurrencyTitle", "0", new Color(11, 11, 11));
            amountText   = new Font(content, "Fonts/Catalogus/CurrencyTitle", "0", new Color(11, 11, 11));

            priceCredits  = new Image(content, @"Menu/Catalogus/Items/credits", Vector2.Zero);
            priceDiamonds = new Image(content, @"Menu/Catalogus/Items/diamonds", Vector2.Zero);
            priceDuckets  = new Image(content, @"Menu/Catalogus/Items/duckets", Vector2.Zero);
            priceGotw     = new Image(content, @"Menu/Catalogus/Items/gotw", Vector2.Zero);
        }
예제 #8
0
        public void ToggleNavigator()
        {
            //RetroEnvironment.GetGame().GetClientManager().GetClientByUserID(GameScreenManager.Instance.ClientID).SendPacket(new GetUserFlatCatsEvent());
            //RetroEnvironment.GetGame().GetClientManager().GetClientByUserID(GameScreenManager.Instance.ClientID).SendPacket(new GetNavigatorFlatsEvent());

            if (Navigator.isOpen())
            {
                Navigator.Close();
            }
            else
            {
                RetroEnvironment.GetGame().GetClientManager().GetClientByUserID(GameScreenManager.Instance.ClientID).ResetRooms();
                RetroEnvironment.GetGame().GetClientManager().SendPacket(new InitializeNewNavigatorEvent());
            }
        }
예제 #9
0
        //TODO: Reset view wnr tab wisselt
        //TODO: Reset tab wnr je menu opent
        //TODO: UI een extra 5px buffer onderaan?????
        //TODO: Als nav dicht is niet nog nav knoppen laten werken
        //TODO: Wnr dropdown open is knoppen onder niet laten werken
        //TODO: IsActive() Variable in gebruik stellen.

        public NavigatorContent(ContentManager content, Vector2i position, Vector2i size, int offsetX = 0, int offsetY = 0) : base(content, position, size, "Navigator", offsetX, offsetY)
        {
            hiddenLine = new Image(content, "Menu/Navigator/hiddenLine", Vector2.Zero);
            backdrop   = new Image(content, "Menu/Navigator/backdrop", Vector2.Zero);

            int width = size.X - 2 * 8;

            width = width / 4;
            this.updateContentVar = content;

            delay          = new Timer(400);
            delay.Elapsed += Delay_Elapsed;

            menuButtons = new List <InMenuButton>();
            menuButtons.Add(new InMenuButton(content, width, () => { foreach (InMenuButton menuButton in menuButtons)
                                                                     {
                                                                         menuButton.Deselect();
                                                                     }
                                                                     RetroEnvironment.GetGame().GetClientManager().SendPacket(new NavigatorSearchEvent("official_view", "")); }, "navigator.toplevelview.official_view"));
            menuButtons.Add(new InMenuButton(content, width, () => { foreach (InMenuButton menuButton in menuButtons)
                                                                     {
                                                                         menuButton.Deselect();
                                                                     }
                                                                     RetroEnvironment.GetGame().GetClientManager().SendPacket(new NavigatorSearchEvent("hotel_view", "")); }, "navigator.toplevelview.hotel_view"));
            menuButtons.Add(new InMenuButton(content, width, () => { foreach (InMenuButton menuButton in menuButtons)
                                                                     {
                                                                         menuButton.Deselect();
                                                                     }
                                                                     RetroEnvironment.GetGame().GetClientManager().SendPacket(new NavigatorSearchEvent("roomads_view", "")); }, "navigator.toplevelview.roomads_view"));
            menuButtons.Add(new InMenuButton(content, width, () => { foreach (InMenuButton menuButton in menuButtons)
                                                                     {
                                                                         menuButton.Deselect();
                                                                     }
                                                                     RetroEnvironment.GetGame().GetClientManager().SendPacket(new NavigatorSearchEvent("myworld_view", "")); }, "navigator.toplevelview.myworld_view"));
            menuButtons.First().SetActive();

            dropdown = new DropdownButton(content, 116, position,
                                          new DropdownItem("navigator.filter.anything", () => { }),
                                          new DropdownItem("navigator.filter.room.name", () => { }),
                                          new DropdownItem("navigator.filter.owner", () => { }),
                                          new DropdownItem("navigator.filter.tag", () => { }),
                                          new DropdownItem("navigator.filter.group", () => { })
                                          );

            view = new ScrollView(content, new Vector2i(0, 0), new Vector2i(388, 356), "menu/Navigator/backdrop", null);
        }
예제 #10
0
        public void Update(GameTime gameTime)
        {
            background.Update(gameTime);
            HelpButton.Update(gameTime);
            ExitButton.Update(gameTime);
            SettingsButton.Update(gameTime);

            if (GameScreenManager.Instance.ClientID != -1)
            {
                User usr = RetroEnvironment.GetGame().GetClientManager().GetClientByUserID(GameScreenManager.Instance.ClientID).GetUser();
                if (usr != null)
                {
                    txtDiamond.SetText(usr.GetDiamonds());
                    txtCredit.SetText(usr.GetCredits());
                    txtDucket.SetText(usr.GetDuckets());
                }
            }
        }
        private void SplashProgressThread()
        {
            int UserID = 1;

            Logger.Debug("Initializing Clientsided Server");
            Logger.Info("Please enter SSOTicket:  ");
            string ssoTicket = "";

            RetroEnvironment.Initialize();
            RetroEnvironment.GetConnectionManager().CreateClient();

            Thread.Sleep(500);
            RetroEnvironment.GetGame().GetClientManager().SendPacket(new GetClientVersionEvent());

            RetroEnvironment.GetGame().GetClientManager().SendPacket(new InitCryptoEvent());
            RetroEnvironment.GetGame().GetClientManager().SendPacket(new GenerateSecretKeyEvent("59f6aa4d465979f7c9226744d3117cd2d7a9ffa3d6b275efe5c3fcf8d18d343c9c543d63bd5c9370bad738abc672a9f43cad956a24e0d30fb0dbaabf44f3f71b1c2160e4eb9fb594d844f10867a90269c952d0111cd124894926fa3bcada300340ef5a385020014f44dde37377c235953d4a9e936b3696cd91da5991ef3bafbc"));

            RetroEnvironment.GetGame().GetClientManager().SendPacket(new ClientVariablesEvent());
            RetroEnvironment.GetGame().GetClientManager().SendPacket(new UniqueIDEvent());

            RetroEnvironment.GetGame().GetClientManager().SendPacket(new SSOTicketEvent(ssoTicket));
            RetroEnvironment.GetGame().GetClientManager().SendPacket(new EventTrackerEvent());
            RetroEnvironment.GetGame().GetClientManager().SendPacket(new InfoRetrieveEvent());
            RetroEnvironment.GetGame().GetClientManager().SendPacket(new EventTrackerEvent());

            splashScreenManager.setPercentage(58);
            Thread.Sleep(500);

            FloorGenerator.Initialize();

            splashScreenManager.setPercentage(76);
            Logger.DebugWarn("Waiting on Connection Confirmation");
            while (!RetroEnvironment.ConnectionIsSucces && !RetroEnvironment.ShutdownStarted)
            {
            }

            Logger.Debug("Completed SplashScreen");

            //if(RetroEnvironment.ConnectionIsSucces)
            SplashscreenFinish();
        }
예제 #12
0
        internal void OpenPage(int id)
        {
            IEnumerable <CatalogusPage> rootPage = (from page in pages where page.Value == -1 && page.Key.pageId == id orderby page.Value descending select page.Key);

            if (rootPage.Count() > 0)
            {
                if (rootPageId != rootPage.First().pageId)
                {
                    Catalogus.LoadNewTree(rootPage.First().pageId, ref pages);
                }
                rootPageId = rootPage.First().pageId;
            }

            RetroEnvironment.GetGame().GetClientManager().SendPacket(new GetCatalogPageEvent(id));
            if (rootPage.Count() <= 0)
            {
                openPageId = id;
            }
            if (rootPage.Count() <= 0)
            {
                SelectItem(id, -1);
            }
        }
예제 #13
0
        public ToolbarContent(ContentManager content, int offsetX = 0, int offsetY = 0)
        {
            offset  = new Vector2(offsetX, offsetY);
            friends = new List <ToggleHoverButton>();
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends.Add(new ToggleHoverButton(content, new Vector2i(127, 36), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/Friends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18)), new ToggleHoverButtonData("Client/ToolBarBottom/FriendBar/NoFriends", () => { foreach (ToggleHoverButton btn in friends) { btn.resetState(); } }, new Vector2(0, 18))));
            //friends[0].toggle();

            float availablePixels      = GameScreenManager.Instance.Dimensions.X - notAvailablePixels - 80;
            float availableFriendSlots = availablePixels / 127;

            maxFriendsDynamic = (int)Math.Floor(availableFriendSlots);

            toggleLeft  = new ToggleButton(content, "Client/ToolBarBottom/ToolBar/ToggleBtn", new Vector2i(2, 1), () => { toggleLeft.Toggle(); });
            toggleRight = new ToggleButton(content, "Client/ToolBarBottom/ToolBar/ToggleBtn", new Vector2i(2, 1), () => { toggleRight.Toggle(); });

            edgeTop    = new Image(content, "Client/ToolBarBottom/ToolBar/Background/Edge", new Vector2(GameScreenManager.Instance.Dimensions.X, 2));
            edgeBottom = new Image(content, "Client/ToolBarBottom/ToolBar/Background/Edge", new Vector2(GameScreenManager.Instance.Dimensions.X, 1));
            background = new Image(content, "Client/ToolBarBottom/ToolBar/Background/Background", new Vector2(GameScreenManager.Instance.Dimensions.X, 47));

            HOHK = new SwitchHoverButton(content, new Vector2(33, 32),
                                         new SwitchHoverButtonData("Client/ToolBarBottom/ToolBar/HomeRoom", () => { RetroEnvironment.GetGame().GetClientManager().SendPacket(new GetHomeRoomEvent()); }, new Vector2(0, 18), new Vector2i(3, 1), Color.PaleVioletRed),
                                         new SwitchHoverButtonData("Client/ToolBarBottom/ToolBar/HotelOverview", () => { RetroEnvironment.GetGame().GetClientManager().SendPacket(new GoToHotelViewEvent()); }, new Vector2(0, 18), new Vector2i(3, 1), Color.PaleVioletRed));
            rooms        = new HoverButton(content, "Client/ToolBarBottom/ToolBar/Rooms", new Vector2i(3, 1), () => { GameScreenManager.Instance.GetNavigatorManager().ToggleNavigator(); }, Color.PaleVioletRed);
            shop         = new HoverButton(content, "Client/ToolBarBottom/ToolBar/Catalogue", new Vector2i(3, 1), () => { GameScreenManager.Instance.GetCatalogusManager().ToggleCatalogus(); }, Color.PaleVioletRed); //Onscherp
            buildersClub = new HoverButton(content, "Client/ToolBarBottom/ToolBar/BuildersClub", new Vector2i(3, 1), () => { Console.WriteLine("buildersClub"); }, Color.PaleVioletRed);
            myItems      = new HoverButton(content, "Client/ToolBarBottom/ToolBar/Inventory", new Vector2i(3, 1), () => { GameScreenManager.Instance.GetInventoryManager().Toggle(); }, Color.PaleVioletRed);
            myProfile    = new HoverButton(content, "Client/ToolBarBottom/ToolBar/GameCenter", new Vector2i(1, 1), () => { Console.WriteLine("myProfile"); }, Color.PaleVioletRed);
            camera       = new HoverButton(content, "Client/ToolBarBottom/ToolBar/Camera", new Vector2i(3, 1), () => { Console.WriteLine("camera"); }, Color.PaleVioletRed);
            dividerOne   = new Image(content, "Client/ToolBarBottom/ToolBar/Divider", Vector2.Zero);

            dividerTwo    = new Image(content, "Client/ToolBarBottom/ToolBar/Divider", Vector2.Zero);
            myFriends     = new HoverButton(content, "Client/ToolBarBottom/FriendBar/FriendList", new Vector2i(3, 1), () => { Console.WriteLine("myFriends"); }, Color.PaleVioletRed);
            searchFriends = new HoverButton(content, "Client/ToolBarBottom/FriendBar/FindFriends", new Vector2i(3, 1), () => { Console.WriteLine("searchFriends"); }, Color.PaleVioletRed);
            messager      = new AnimationSwitchHoverButton(content, new Vector2(28, 33), new Vector2i(2, 3), 432,
                                                           new AnimationSwitchHoverButtonData("Client/ToolBarBottom/FriendBar/PrivateChatNoChat", () => { /* Nothing todo no messages */ }, new Vector2(0, 18), new Vector2i(3, 1), Color.PaleVioletRed),
                                                           new AnimationSwitchHoverButtonData("Client/ToolBarBottom/FriendBar/PrivateChatHasChat", () => { Console.WriteLine("messager"); }, new Vector2(0, 18), new Vector2i(3, 1), Color.PaleVioletRed),
                                                           new AnimationSwitchHoverButtonData("Client/ToolBarBottom/FriendBar/PrivateChatHasNotification_0", () => { messager.stopAnimation(); }, new Vector2(0, 18), new Vector2i(3, 1), Color.PaleVioletRed),
                                                           new AnimationSwitchHoverButtonData("Client/ToolBarBottom/FriendBar/PrivateChatHasNotification_1", () => { messager.stopAnimation(); }, new Vector2(0, 18), new Vector2i(3, 1), Color.PaleVioletRed));

            friendsLeft  = new HoverButton(content, "Client/ToolBarBottom/FriendBar/toggleBtn", new Vector2i(3, 1), () => { showNum += 1; }, Color.White);
            friendsRight = new HoverButton(content, "Client/ToolBarBottom/FriendBar/toggleBtn", new Vector2i(3, 1), () => { showNum -= 1; }, Color.White);
        }
예제 #14
0
        public InventoryContent(ContentManager content, Vector2i position, Vector2i size, int offsetX = 0, int offsetY = 0) : base(content, position, size, "Inventory", offsetX, offsetY)
        {
            invItemSections = new List <InventoryItemSection>();

            rootContainer = new TopButtonsContainer(content);
            rootContainer.SetWidth(GetSize().X);

            rootContainer.AddButton(4, () =>
            {
                RetroEnvironment.GetGame().GetClientManager().SendPacket(new RequestFurniInventoryEvent());
                GameScreenManager.Instance.GetInventoryManager().Reset();

                foreach (InMenuButton btn in rootContainer.GetButtons())
                {
                    btn.Deselect();
                }
            }, "inventory.toplevelview.furni");
            rootContainer.AddButton(4, () =>
            {
                Logger.Debug("Opening Pets");
                GameScreenManager.Instance.GetInventoryManager().Reset();

                foreach (InMenuButton btn in rootContainer.GetButtons())
                {
                    btn.Deselect();
                }
            }, "inventory.toplevelview.pets");
            rootContainer.AddButton(4, () =>
            {
                Logger.Debug("Opening Badges");
                GameScreenManager.Instance.GetInventoryManager().Reset();

                foreach (InMenuButton btn in rootContainer.GetButtons())
                {
                    btn.Deselect();
                }
            }, "inventory.toplevelview.badges");
            rootContainer.AddButton(4, () =>
            {
                Logger.Debug("Opening Bots");
                GameScreenManager.Instance.GetInventoryManager().Reset();

                foreach (InMenuButton btn in rootContainer.GetButtons())
                {
                    btn.Deselect();
                }
            }, "inventory.toplevelview.bots");

            noItemsImg     = new Image(content, "Menu/Inventory/noItems", Vector2.Zero);
            noItemsHead    = new Font(content, "Fonts/Inventory/EmptyHead", "inventory.empty.head", new Color(222, 8, 8));
            noItemsBody    = new Font(content, "Fonts/Inventory/EmptyBody", "inventory.empty.body", new Color(18, 18, 18));
            openCataButton = new HoverConstructedButton(content, () => { GameScreenManager.Instance.GetCatalogusManager().Open(); }, new Vector2i(140, 50),
                                                        HoverConstructedButtonType.BASIC1,
                                                        new Color[] { new Color(243, 243, 243), new Color(225, 225, 225), new Color(255, 255, 255) },
                                                        new Color[] { new Color(217, 217, 217), new Color(163, 163, 163), new Color(238, 238, 238) },
                                                        "inventory.button.goto.cata", "Fonts/Inventory/EmptyButton");

            itemDisplay = new ScrollView(content, new Vector2i(0, 0), new Vector2i(285, 235), "menu/Navigator/backdrop", null);

            canTrade    = new Image(content, "Menu/Inventory/Furni/canTrade", Vector2.Zero);
            cantTrade   = new Image(content, "Menu/Inventory/Furni/cantTrade", Vector2.Zero);
            canRecycle  = new Image(content, "Menu/Inventory/Furni/canRecycle", Vector2.Zero);
            cantRecycle = new Image(content, "Menu/Inventory/Furni/cantRecycle", Vector2.Zero);

            selectedItem  = new Font(content, "Fonts/Inventory/selectedItem", "inventory.item.text.noselected", new Color(0, 0, 0));
            amountTrade   = new Font(content, "Fonts/Inventory/amountTrade", "0", new Color(0, 0, 0));
            amountRecycle = new Font(content, "Fonts/Inventory/amountRecycle", "0", new Color(0, 0, 0));

            placeItemButton = new HoverConstructedButton(content, () =>
            {
                GameScreenManager.Instance.GetRoomManager().DisplayGhostItem(GameScreenManager.Instance.GetInventoryManager().GetSelectedItem());
            }, new Vector2i(150, 22),
                                                         HoverConstructedButtonType.BASIC1,
                                                         new Color[] { new Color(243, 243, 243), new Color(225, 225, 225), new Color(255, 255, 255) },
                                                         new Color[] { new Color(217, 217, 217), new Color(163, 163, 163), new Color(238, 238, 238) },
                                                         "inventory.item.button.placeInRoom", "Fonts/Inventory/placeButton");
        }
예제 #15
0
 internal void OpenNavigator()
 {
     Navigator.Open();
     RetroEnvironment.GetGame().GetClientManager().SendPacket(new NavigatorSearchEvent("official_view", ""));
 }
예제 #16
0
 internal void Open()
 {
     RetroEnvironment.GetGame().GetClientManager().SendPacket(new GetCatalogIndexEvent());
 }