private void load(IBindableBeatmap beatmap, IAdjustableClock adjustableClock, OsuColour colours) { this.adjustableClock = adjustableClock; Child = waveform = new WaveformGraph { RelativeSizeAxes = Axes.Both, Colour = colours.Blue.Opacity(0.2f), LowColour = colours.BlueLighter, MidColour = colours.BlueDark, HighColour = colours.BlueDarker, Depth = float.MaxValue }; // We don't want the centre marker to scroll AddInternal(new CentreMarker()); WaveformVisible.ValueChanged += visible => waveform.FadeTo(visible ? 1 : 0, 200, Easing.OutQuint); Beatmap.BindTo(beatmap); Beatmap.BindValueChanged(b => { waveform.Waveform = b.Waveform; track = b.Track; }, true); }
private void load(IBindableBeatmap beatmap, OsuColour colours) { this.beatmap.BindTo(beatmap); // linear colour looks better in this case, so let's use it for now. Color4 gradientDark = colours.Blue.Opacity(0).ToLinear(); Color4 gradientLight = colours.Blue.Opacity(0.6f).ToLinear(); Children = new Drawable[] { leftBox = new Box { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, RelativeSizeAxes = Axes.Y, Width = box_width * 2, // align off-screen to make sure our edges don't become visible during parallax. X = -box_width, Alpha = 0, Blending = BlendingMode.Additive, Colour = ColourInfo.GradientHorizontal(gradientLight, gradientDark) }, rightBox = new Box { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, RelativeSizeAxes = Axes.Y, Width = box_width * 2, X = box_width, Alpha = 0, Blending = BlendingMode.Additive, Colour = ColourInfo.GradientHorizontal(gradientDark, gradientLight) } }; }
private void load(IBindableBeatmap beatmap, IAdjustableClock clock) { this.beatmap.BindTo(beatmap); EditorClock = clock; ApplyDefaultsToHitObject(); }
private void load(BeatmapManager beatmaps, IBindableBeatmap beatmap) { beatmaps.GetAllUsableBeatmapSets().ForEach(b => addBeatmapSet(b, false, false)); beatmaps.ItemAdded += addBeatmapSet; beatmaps.ItemRemoved += removeBeatmapSet; beatmapBacking.BindTo(beatmap); beatmapBacking.ValueChanged += _ => updateSelectedSet(); }
private void load(IBindableBeatmap beatmap) { this.beatmap = beatmap.Value; HitObjectContainer = CreateHitObjectContainer(); HitObjectContainer.RelativeSizeAxes = Axes.Both; Add(HitObjectContainer); }
private void load(IBindableBeatmap beatmap) { // Try first with the full name, then attempt with no path channel = beatmap.Value.Skin.GetSample(sample.Path) ?? beatmap.Value.Skin.GetSample(Path.ChangeExtension(sample.Path, null)); if (channel != null) { channel.Volume.Value = sample.Volume / 100; } }
private void load(IBindableBeatmap beatmap, TextureStore textureStore) { var spritePath = Sprite.Path.ToLowerInvariant(); var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.ToLowerInvariant() == spritePath)?.FileInfo.StoragePath; if (path == null) { return; } Texture = textureStore.Get(path); Sprite.ApplyTransforms(this); }
private void load(IBindableBeatmap beatmap) { Child = waveform = new WaveformGraph { RelativeSizeAxes = Axes.Both, Colour = OsuColour.FromHex("222"), Depth = float.MaxValue }; WaveformVisible.ValueChanged += visible => waveform.FadeTo(visible ? 1 : 0, 200, Easing.OutQuint); Beatmap.BindTo(beatmap); }
private void load(IBindableBeatmap beatmap, APIAccess api) { this.api = api; if (!api.IsLoggedIn) { InternalChild = new OsuSpriteText { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Text = "Please sign in to see online scores", }; } currentBeatmap.ValueChanged += beatmapChanged; currentBeatmap.BindTo(beatmap); }
private void load(IBindableBeatmap beatmap, TextureStore textureStore) { var basePath = Animation.Path.ToLowerInvariant(); for (var frame = 0; frame < Animation.FrameCount; frame++) { var framePath = basePath.Replace(".", frame + "."); var path = beatmap.Value.BeatmapSetInfo.Files.Find(f => f.Filename.ToLowerInvariant() == framePath)?.FileInfo.StoragePath; if (path == null) { continue; } var texture = textureStore.Get(path); AddFrame(texture, Animation.FrameDelay); } Animation.ApplyTransforms(this); }
private void load(IBindableBeatmap beatmap) { this.beatmap.BindTo(beatmap); this.beatmap.BindValueChanged(beatmapChanged, true); }
private void load(OsuConfigManager config, IBindableBeatmap beatmap) { Child = cursorContainer = new SkinnableDrawable("cursor", _ => new CircularContainer { RelativeSizeAxes = Axes.Both, Masking = true, BorderThickness = Size.X / 6, BorderColour = Color4.White, EdgeEffect = new EdgeEffectParameters { Type = EdgeEffectType.Shadow, Colour = Color4.Pink.Opacity(0.5f), Radius = 5, }, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Alpha = 0, AlwaysPresent = true, }, new CircularContainer { Origin = Anchor.Centre, Anchor = Anchor.Centre, RelativeSizeAxes = Axes.Both, Masking = true, BorderThickness = Size.X / 3, BorderColour = Color4.White.Opacity(0.5f), Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Alpha = 0, AlwaysPresent = true, }, }, }, new CircularContainer { Origin = Anchor.Centre, Anchor = Anchor.Centre, RelativeSizeAxes = Axes.Both, Scale = new Vector2(0.1f), Masking = true, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.White, }, }, }, } }, restrictSize: false) { Origin = Anchor.Centre, Anchor = Anchor.Centre, RelativeSizeAxes = Axes.Both, }; this.beatmap.BindTo(beatmap); this.beatmap.ValueChanged += v => calculateScale(); cursorScale = config.GetBindable <double>(OsuSetting.GameplayCursorSize); cursorScale.ValueChanged += v => calculateScale(); autoCursorScale = config.GetBindable <bool>(OsuSetting.AutoCursorSize); autoCursorScale.ValueChanged += v => calculateScale(); calculateScale(); }
private void load(IBindableBeatmap beatmap) { Beatmap.BindTo(beatmap); }
private void load(ShaderManager shaders, IBindableBeatmap beatmap) { this.beatmap.BindTo(beatmap); shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED); }
private void load(IBindableBeatmap beatmap) { beatmap.ValueChanged += beatmapChanged; }
private void load(IBindableBeatmap beatmap, IFrameBasedClock framedClock) { Beatmap.BindTo(beatmap); try { RulesetContainer = CreateRulesetContainer(); RulesetContainer.Clock = framedClock; } catch (Exception e) { Logger.Error(e, "Could not load beatmap sucessfully!"); return; } var layerBelowRuleset = CreateLayerContainer(); layerBelowRuleset.Child = new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both }; var layerAboveRuleset = CreateLayerContainer(); layerAboveRuleset.Child = blueprintContainer = new BlueprintContainer(); layerContainers.Add(layerBelowRuleset); layerContainers.Add(layerAboveRuleset); RadioButtonCollection toolboxCollection; InternalChild = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new FillFlowContainer { Name = "Sidebar", RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Right = 10 }, Children = new Drawable[] { new ToolboxGroup { Child = toolboxCollection = new RadioButtonCollection { RelativeSizeAxes = Axes.X } } } }, new Container { Name = "Content", RelativeSizeAxes = Axes.Both, Children = new Drawable[] { layerBelowRuleset, RulesetContainer, layerAboveRuleset } } }, }, ColumnDimensions = new[] { new Dimension(GridSizeMode.Absolute, 200), } }; toolboxCollection.Items = CompositionTools.Select(t => new RadioButton(t.Name, () => blueprintContainer.CurrentTool = t)) .Prepend(new RadioButton("Select", () => blueprintContainer.CurrentTool = null)) .ToList(); toolboxCollection.Items[0].Select(); }
private void load(IAdjustableClock adjustableClock, IBindableBeatmap beatmap) { this.adjustableClock = adjustableClock; this.beatmap.BindTo(beatmap); }
private void load(IBindableBeatmap beatmap) { this.beatmap = beatmap.Value; }
private void load(IBindableBeatmap beatmap, OsuColour colours) { Beatmap.BindTo(beatmap); background.Colour = colours.Gray1; }