Example #1
0
        public EntourageGui(IGuiManager guiManager)
            : base(guiManager, mResourcePath)
        {
            foreach (IGuiElement element in this.AllElements)
            {
                if (element.Name == "EntourageGui" && element is Window)
                {
                    mMainWindow = (Window)element;

                    Button closeButton = mMainWindow.SelectSingleElement <Button>("MainFrame/EntourageListingsFrame/CancelButton");
                    closeButton.AddOnPressedAction(
                        delegate()
                    {
                        GameFacade.Instance.SendNotification(GameFacade.PLAY_SOUND_CLOSE);
                        mMainWindow.Showing = false;
                    }
                        );

                    mMemberCountLabel         = mMainWindow.SelectSingleElement <Label>("MainFrame/EntourageListingsFrame/MemberCountLabel");
                    mMemberCountLabel.Text    = String.Format(Translation.ENTOURAGE_MEMBER_COUNT, 0);
                    mInviteFriendsButton      = mMainWindow.SelectSingleElement <Button>("MainFrame/EntourageListingsFrame/InviteFriendsButton");
                    mInviteFriendsButton.Text = Translation.ENTOURAGE_INVITE_FRIENDS_BUTTON_TEXT;
                    mInviteFriendsButton.AddOnPressedAction(delegate()
                    {
                        InviteFriendsToEntourage();
                    });

                    mEntourageListScrollFrame       = mMainWindow.SelectSingleElement <ScrollFrame>("MainFrame/EntourageListingsFrame/EntourageListScrollFrame");
                    mEntourageListingPrototypeFrame = mMainWindow.SelectSingleElement <IGuiFrame>("MainFrame/EntourageListingsFrame/EntourageListScrollFrame/EntourageListingPrototypeFrame");
                    mEntourageListScrollFrame.RemoveChildWidget(mEntourageListingPrototypeFrame);
                }
            }
        }
Example #2
0
        public Scrollbar(Scrollbar copy)
            : base(copy)
        {
            mThumb  = new ScrollbarThumb(copy.mThumb);
            mTrough = new PushButton(copy.mTrough);

            mFrame       = copy.mFrame;
            mPathToFrame = copy.mPathToFrame;
        }
Example #3
0
        public RoomAPIGui(IGuiManager guiManager)
            : base(guiManager, mResourcePath)
        {
            foreach (IGuiElement element in this.AllElements)
            {
                if (element.Name == "RoomAPIGui" && element is Window)
                {
                    mMainWindow = (Window)element;

                    Button closeButton = mMainWindow.SelectSingleElement <Button>("HeaderFrame/CloseButton");
                    closeButton.AddOnPressedAction(
                        delegate()
                    {
                        mMainWindow.Showing = false;
                    }
                        );

                    mMyRoomListScrollFrame       = mMainWindow.SelectSingleElement <ScrollFrame>("MainFrame/RoomListFrame");
                    mCreateRoomTextbox           = mMainWindow.SelectSingleElement <Textbox>("MainFrame/NewRoomName");
                    mCreateGreenScreenRoomButton = mMainWindow.SelectSingleElement <Button>("MainFrame/CreateGreenScreenRoom");
                    mCreateGreenScreenRoomButton.AddOnPressedAction(
                        delegate()
                    {
                        CreateRoom(mCreateRoomTextbox.Text, RoomType.GreenScreenRoom);
                    }
                        );
                    mCreateMiniGameRoomButton = mMainWindow.SelectSingleElement <Button>("MainFrame/CreateMiniGameRoom");
                    mCreateMiniGameRoomButton.AddOnPressedAction(
                        delegate()
                    {
                        CreateRoom(mCreateRoomTextbox.Text, RoomType.MiniGameRoom);
                    }
                        );
                    mMyRoomListingFramePrototype = mMainWindow.SelectSingleElement <IGuiFrame>("MainFrame/RoomListFrame/RoomListingPrototype");

                    mMyRoomListScrollFrame.RemoveChildWidget(mMyRoomListingFramePrototype);

                    Button nextRoomButton = mMainWindow.SelectSingleElement <Button>("MainFrame/NextRoomButton");
                    nextRoomButton.AddOnPressedAction(GetNextRoom);
                    Button previousRoomButton = mMainWindow.SelectSingleElement <Button>("MainFrame/PreviousRoomButton");
                    previousRoomButton.AddOnPressedAction(GetPreviousRoom);
                }
            }
        }
Example #4
0
        public FriendsGui(IGuiManager guiManager)
            : base(guiManager, mResourcePath)
        {
            foreach (IGuiElement element in this.AllElements)
            {
                if (element.Name == "FriendsGui" && element is Window)
                {
                    mMainWindow = (Window)element;

                    Button closeButton = mMainWindow.SelectSingleElement <Button>("HeaderFrame/CloseButton");
                    closeButton.AddOnPressedAction(
                        delegate()
                    {
                        GameFacade.Instance.SendNotification(GameFacade.PLAY_SOUND_CLOSE);
                        mMainWindow.Showing = false;
                    }
                        );

                    mFriendListScrollFrame       = mMainWindow.SelectSingleElement <ScrollFrame>("MainFrame/FriendListScrollFrame");
                    mFriendListingPrototypeFrame = mMainWindow.SelectSingleElement <IGuiFrame>("MainFrame/FriendListScrollFrame/FriendListingPrototype");
                    mFriendListScrollFrame.RemoveChildWidget(mFriendListingPrototypeFrame);
                }
            }
        }