Exemple #1
0
        public LoungeSubScreen(Action <Screen> pushGameplayScreen)
        {
            this.pushGameplayScreen = pushGameplayScreen;

            RoomInspector inspector;

            Children = new Drawable[]
            {
                Filter = new FilterControl {
                    Depth = -1
                },
                content = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new Container
                        {
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.55f,
                            Children         = new Drawable[]
                            {
                                new ScrollContainer
                                {
                                    RelativeSizeAxes         = Axes.Both,
                                    ScrollbarOverlapsContent = false,
                                    Padding = new MarginPadding(10),
                                    Child   = new SearchContainer
                                    {
                                        RelativeSizeAxes = Axes.X,
                                        AutoSizeAxes     = Axes.Y,
                                        Child            = rooms = new RoomsContainer {
                                            JoinRequested = joinRequested
                                        }
                                    },
                                },
                                processingOverlay = new ProcessingOverlay {
                                    Alpha = 0
                                }
                            }
                        },
                        inspector = new RoomInspector
                        {
                            Anchor           = Anchor.TopRight,
                            Origin           = Anchor.TopRight,
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.45f,
                        },
                    },
                },
            };

            inspector.Room.BindTo(rooms.SelectedRoom);

            Filter.Search.Current.ValueChanged += s => filterRooms();
            Filter.Tabs.Current.ValueChanged   += t => filterRooms();
            Filter.Search.Exit += Exit;
        }
Exemple #2
0
    public override void OnInspectorGUI()
    {
        RoomInspector room = target as RoomInspector;

        EditorGUILayout.TextField("ResPath", room.roomData.GetPath());
        for (int i = 0; i < room.roomData.gridList.Count; ++i)
        {
            EditorGUILayout.TextField("Grid" + i, "Index:" + room.roomData.gridList[i].index + ", Pos:" + room.roomData.gridList[i].position);
        }

        base.DrawDefaultInspector();
    }
Exemple #3
0
        public Lounge()
        {
            Children = new Drawable[]
            {
                Filter  = new FilterControl(),
                content = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        new ScrollContainer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.55f,
                            Padding          = new MarginPadding
                            {
                                Vertical = 35 - DrawableRoom.SELECTION_BORDER_WIDTH,
                                Right    = 20 - DrawableRoom.SELECTION_BORDER_WIDTH
                            },
                            Child = search = new SearchContainer
                            {
                                RelativeSizeAxes = Axes.X,
                                AutoSizeAxes     = Axes.Y,
                                Child            = RoomsContainer = new RoomsFilterContainer
                                {
                                    RelativeSizeAxes = Axes.X,
                                    AutoSizeAxes     = Axes.Y,
                                    Direction        = FillDirection.Vertical,
                                    Spacing          = new Vector2(10 - DrawableRoom.SELECTION_BORDER_WIDTH * 2),
                                },
                            },
                        },
                        Inspector = new RoomInspector
                        {
                            Anchor           = Anchor.TopRight,
                            Origin           = Anchor.TopRight,
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.45f,
                        },
                    },
                },
            };

            Filter.Search.Current.ValueChanged += s => filterRooms();
            Filter.Tabs.Current.ValueChanged   += t => filterRooms();
            Filter.Search.Exit += Exit;
        }
Exemple #4
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            var room = new Room
            {
                Name = { Value = @"My Awesome Room" },
                Host = { Value            = new User    {
                             Username     = @"flyte", Id = 3103765, Country = new Country{
                                 FlagName = @"JP"
                             }
                         } },
                Status  = { Value = new RoomStatusOpen() },
                Type    = { Value = new GameTypeTeamVersus() },
                Beatmap =
                {
                    Value              = new BeatmapInfo
                    {
                        StarDifficulty =                    3.7,
                        Ruleset        = rulesets.GetRuleset(3),
                        Metadata       = new BeatmapMetadata
                        {
                            Title  = @"Platina",
                            Artist = @"Maaya Sakamoto",
                            Author = @"uwutm8",
                        },
                        OnlineInfo     = new BeatmapOnlineInfo
                        {
                            Covers     = new[] { @"https://assets.ppy.sh//beatmaps/560573/covers/cover.jpg?1492722343" },
                        },
                    }
                },
                MaxParticipants = { Value = 200 },
                Participants    =
                {
                    Value            = new[]
                    {
                        new User {
                            Username = @"flyte",    Id = 3103765, GlobalRank = 1425
                        },
                        new User {
                            Username = @"Cookiezi", Id =  124493, GlobalRank = 5466
                        },
                        new User {
                            Username = @"Angelsim", Id = 1777162, GlobalRank = 2873
                        },
                        new User {
                            Username = @"Rafis",    Id = 2558286, GlobalRank = 4687
                        },
                        new User {
                            Username = @"hvick225", Id =   50265, GlobalRank = 3258
                        },
                        new User {
                            Username = @"peppy",    Id =       2, GlobalRank = 6251
                        }
                    }
                }
            };

            RoomInspector inspector;

            Add(inspector = new RoomInspector
            {
                Anchor = Anchor.Centre,
                Origin = Anchor.Centre,
                Room   = room,
            });

            AddStep(@"change title", () => room.Name.Value = @"A Better Room Than The Above");
            AddStep(@"change host", () => room.Host.Value  = new User {
                Username = @"DrabWeb", Id = 6946022, Country = new Country {
                    FlagName = @"CA"
                }
            });
            AddStep(@"change status", () => room.Status.Value   = new RoomStatusPlaying());
            AddStep(@"change type", () => room.Type.Value       = new GameTypeTag());
            AddStep(@"change beatmap", () => room.Beatmap.Value = null);
            AddStep(@"change max participants", () => room.MaxParticipants.Value = null);
            AddStep(@"change participants", () => room.Participants.Value        = new[]
            {
                new User {
                    Username = @"filsdelama", Id = 2831793, GlobalRank = 8542
                },
                new User {
                    Username = @"_index", Id = 652457, GlobalRank = 15024
                }
            });

            AddStep(@"change room", () =>
            {
                var newRoom = new Room
                {
                    Name = { Value = @"My New, Better Than Ever Room" },
                    Host = { Value            = new User    {
                                 Username     = @"Angelsim", Id = 1777162, Country = new Country{
                                     FlagName = @"KR"
                                 }
                             } },
                    Status  = { Value = new RoomStatusOpen() },
                    Type    = { Value = new GameTypeTagTeam() },
                    Beatmap =
                    {
                        Value              = new BeatmapInfo
                        {
                            StarDifficulty =                   7.07,
                            Ruleset        = rulesets.GetRuleset(0),
                            Metadata       = new BeatmapMetadata
                            {
                                Title  = @"xi",
                                Artist = @"FREEDOM DIVE",
                                Author = @"Nakagawa-Kanon",
                            },
                            OnlineInfo     = new BeatmapOnlineInfo
                            {
                                Covers     = new[] { @"https://assets.ppy.sh//beatmaps/39804/covers/cover.jpg?1456506845" },
                            },
                        }
                    },
                    MaxParticipants = { Value = 10 },
                    Participants    =
                    {
                        Value            = new[]
                        {
                            new User {
                                Username = @"Angelsim",   Id = 1777162, GlobalRank = 4
                            },
                            new User {
                                Username = @"HappyStick", Id =  256802, GlobalRank = 752
                            },
                            new User {
                                Username = @"-Konpaku-",  Id = 2258797, GlobalRank = 571
                            }
                        }
                    }
                };

                inspector.Room = newRoom;
            });
        }
 protected override void Setup()
 {
     // Debug.Log("Auto-locating level generator");
     t   = gen;
     gui = new RoomInspector(t);
 }