mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Welded bindables.
This commit is contained in:
parent
c5ad79e3e2
commit
c227eb1be5
@ -1 +1 @@
|
||||
Subproject commit 7cad7cf48b2ae9f16cac503d46bd0ea801e7561f
|
||||
Subproject commit 12fbf2b94af0ddef9daf0fab11c05288dee054a7
|
@ -79,8 +79,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
snakingIn = config.GetBindable<bool>(OsuConfig.SnakingInSliders);
|
||||
snakingOut = config.GetBindable<bool>(OsuConfig.SnakingOutSliders);
|
||||
snakingIn = config.GetWeldedBindable<bool>(OsuConfig.SnakingInSliders);
|
||||
snakingOut = config.GetWeldedBindable<bool>(OsuConfig.SnakingOutSliders);
|
||||
|
||||
int textureWidth = (int)PathWidth * 2;
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
this.config = config;
|
||||
|
||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
||||
preferUnicode = config.GetWeldedBindable<bool>(OsuConfig.ShowUnicode);
|
||||
preferUnicode.ValueChanged += preferUnicode_changed;
|
||||
preferUnicode_changed(preferUnicode, null);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Graphics.Containers
|
||||
private void load(UserInputManager input, OsuConfigManager config)
|
||||
{
|
||||
this.input = input;
|
||||
parallaxEnabled = config.GetBindable<bool>(OsuConfig.MenuParallax);
|
||||
parallaxEnabled = config.GetWeldedBindable<bool>(OsuConfig.MenuParallax);
|
||||
parallaxEnabled.ValueChanged += delegate
|
||||
{
|
||||
if (!parallaxEnabled)
|
||||
|
@ -43,7 +43,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
class OsuCursor : Container
|
||||
{
|
||||
private Container cursorContainer;
|
||||
private BindableDouble cursorScale;
|
||||
private Bindable<double> cursorScale;
|
||||
|
||||
public OsuCursor()
|
||||
{
|
||||
@ -54,7 +54,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures, OsuConfigManager config)
|
||||
{
|
||||
cursorScale = (BindableDouble)config.GetBindable<double>(OsuConfig.CursorSize);
|
||||
cursorScale = config.GetWeldedBindable<double>(OsuConfig.CursorSize);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ namespace osu.Game
|
||||
|
||||
Dependencies.Cache(this);
|
||||
|
||||
PlayMode = LocalConfig.GetBindable<PlayMode>(OsuConfig.PlayMode);
|
||||
PlayMode = LocalConfig.GetWeldedBindable<PlayMode>(OsuConfig.PlayMode);
|
||||
}
|
||||
|
||||
protected async void ImportBeatmapsAsync(IEnumerable<string> paths)
|
||||
|
@ -211,7 +211,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
this.beatmaps = beatmaps;
|
||||
trackManager = osuGame.Audio.Track;
|
||||
preferUnicode = config.GetBindable<bool>(OsuConfig.ShowUnicode);
|
||||
preferUnicode = config.GetWeldedBindable<bool>(OsuConfig.ShowUnicode);
|
||||
preferUnicode.ValueChanged += preferUnicode_changed;
|
||||
|
||||
beatmapSource = osuGame.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio
|
||||
new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Universal Offset",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(OsuConfig.Offset)
|
||||
Bindable = (BindableInt)config.GetWeldedBindable<int>(OsuConfig.Offset)
|
||||
},
|
||||
new OsuButton
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Ignore beatmap hitsounds",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSamples)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.IgnoreBeatmapSamples)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Options.Sections.Debug
|
||||
new OptionEnumDropDown<GCLatencyMode>
|
||||
{
|
||||
LabelText = "Active mode",
|
||||
Bindable = config.GetBindable<GCLatencyMode>(FrameworkDebugConfig.ActiveGCMode)
|
||||
Bindable = config.GetWeldedBindable<GCLatencyMode>(FrameworkDebugConfig.ActiveGCMode)
|
||||
},
|
||||
new OsuButton
|
||||
{
|
||||
|
@ -24,32 +24,32 @@ namespace osu.Game.Overlays.Options.Sections
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Background video",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.VideoEditor)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.VideoEditor)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Always use default skin",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorDefaultSkin)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.EditorDefaultSkin)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Snaking sliders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorSnakingSliders)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.EditorSnakingSliders)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Hit animations",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorHitAnimations)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.EditorHitAnimations)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Follow points",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorFollowPoints)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.EditorFollowPoints)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Stacking",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.EditorStacking)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.EditorStacking)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -21,42 +21,42 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
|
||||
new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Background dim",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(OsuConfig.DimLevel)
|
||||
Bindable = (BindableInt)config.GetWeldedBindable<int>(OsuConfig.DimLevel)
|
||||
},
|
||||
new OptionEnumDropDown<ProgressBarType>
|
||||
{
|
||||
LabelText = "Progress display",
|
||||
Bindable = config.GetBindable<ProgressBarType>(OsuConfig.ProgressBarType)
|
||||
Bindable = config.GetWeldedBindable<ProgressBarType>(OsuConfig.ProgressBarType)
|
||||
},
|
||||
new OptionEnumDropDown<ScoreMeterType>
|
||||
{
|
||||
LabelText = "Score meter type",
|
||||
Bindable = config.GetBindable<ScoreMeterType>(OsuConfig.ScoreMeter)
|
||||
Bindable = config.GetWeldedBindable<ScoreMeterType>(OsuConfig.ScoreMeter)
|
||||
},
|
||||
new OptionSlider<double>
|
||||
{
|
||||
LabelText = "Score meter size",
|
||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.ScoreMeterScale)
|
||||
Bindable = (BindableDouble)config.GetWeldedBindable<double>(OsuConfig.ScoreMeterScale)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Always show key overlay",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.KeyOverlay)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.KeyOverlay)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show approach circle on first \"Hidden\" object",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.HiddenShowFirstApproach)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.HiddenShowFirstApproach)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Scale osu!mania scroll speed with BPM",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ManiaSpeedBPMScale)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ManiaSpeedBPMScale)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Remember osu!mania scroll speed per beatmap",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.UsePerBeatmapManiaSpeed)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Gameplay
|
||||
new OptionSlider<double>
|
||||
{
|
||||
LabelText = "Display beatmaps from",
|
||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.DisplayStarsMinimum)
|
||||
Bindable = (BindableDouble)config.GetWeldedBindable<double>(OsuConfig.DisplayStarsMinimum)
|
||||
},
|
||||
new OptionSlider<double>
|
||||
{
|
||||
LabelText = "up to",
|
||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.DisplayStarsMaximum)
|
||||
Bindable = (BindableDouble)config.GetWeldedBindable<double>(OsuConfig.DisplayStarsMaximum)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ namespace osu.Game.Overlays.Options.Sections.General
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Prefer metadata in original language",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowUnicode)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ShowUnicode)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Use alternative font for chat display",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AlternativeChatFont)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.AlternativeChatFont)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -122,12 +122,12 @@ namespace osu.Game.Overlays.Options.Sections.General
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Remember username",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SaveUsername),
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.SaveUsername),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Stay logged in",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SavePassword),
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.SavePassword),
|
||||
},
|
||||
new OsuButton
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
||||
new OptionEnumDropDown<ReleaseStream>
|
||||
{
|
||||
LabelText = "Release stream",
|
||||
Bindable = config.GetBindable<ReleaseStream>(OsuConfig.ReleaseStream),
|
||||
Bindable = config.GetWeldedBindable<ReleaseStream>(OsuConfig.ReleaseStream),
|
||||
},
|
||||
new OptionLabel { Text = "Your osu! is up to date" }, // TODO: map this to reality
|
||||
new OsuButton
|
||||
|
@ -20,47 +20,47 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Snaking in sliders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SnakingInSliders)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.SnakingInSliders)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Snaking out sliders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SnakingOutSliders)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.SnakingOutSliders)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Background video",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Video)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.Video)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Storyboards",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowStoryboard)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ShowStoryboard)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Combo bursts",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ComboBurst)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ComboBurst)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Hit lighting",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.HitLighting)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.HitLighting)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Shaders",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Bloom)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.Bloom)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Softening filter",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.BloomSoftening)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.BloomSoftening)
|
||||
},
|
||||
new OptionEnumDropDown<ScreenshotFormat>
|
||||
{
|
||||
LabelText = "Screenshot",
|
||||
Bindable = config.GetBindable<ScreenshotFormat>(OsuConfig.ScreenshotFormat)
|
||||
Bindable = config.GetWeldedBindable<ScreenshotFormat>(OsuConfig.ScreenshotFormat)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -21,22 +21,22 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OptionEnumDropDown<WindowMode>
|
||||
{
|
||||
LabelText = "Screen mode",
|
||||
Bindable = config.GetBindable<WindowMode>(FrameworkConfig.WindowMode),
|
||||
Bindable = config.GetWeldedBindable<WindowMode>(FrameworkConfig.WindowMode),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Letterboxing",
|
||||
Bindable = config.GetBindable<bool>(FrameworkConfig.Letterboxing),
|
||||
Bindable = config.GetWeldedBindable<bool>(FrameworkConfig.Letterboxing),
|
||||
},
|
||||
new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Horizontal position",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionX)
|
||||
Bindable = (BindableInt)config.GetWeldedBindable<int>(FrameworkConfig.LetterboxPositionX)
|
||||
},
|
||||
new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Vertical position",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionY)
|
||||
Bindable = (BindableInt)config.GetWeldedBindable<int>(FrameworkConfig.LetterboxPositionY)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -19,27 +19,27 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Snow",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuSnow)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MenuSnow)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Parallax",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuParallax)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MenuParallax)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Menu tips",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ShowMenuTips)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ShowMenuTips)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Interface voices",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuVoice)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MenuVoice)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "osu! music theme",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MenuMusic)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MenuMusic)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -23,22 +23,22 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OptionEnumDropDown<FrameSync>
|
||||
{
|
||||
LabelText = "Frame limiter",
|
||||
Bindable = config.GetBindable<FrameSync>(FrameworkConfig.FrameSync)
|
||||
Bindable = config.GetWeldedBindable<FrameSync>(FrameworkConfig.FrameSync)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show FPS counter",
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.FpsCounter),
|
||||
Bindable = osuConfig.GetWeldedBindable<bool>(OsuConfig.FpsCounter),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Reduce dropped frames",
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.ForceFrameFlush),
|
||||
Bindable = osuConfig.GetWeldedBindable<bool>(OsuConfig.ForceFrameFlush),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Detect performance issues",
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.DetectPerformanceIssues),
|
||||
Bindable = osuConfig.GetWeldedBindable<bool>(OsuConfig.DetectPerformanceIssues),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show thumbnails",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SongSelectThumbnails)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.SongSelectThumbnails)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -21,37 +21,37 @@ namespace osu.Game.Overlays.Options.Sections.Input
|
||||
new OptionSlider<double>
|
||||
{
|
||||
LabelText = "Sensitivity",
|
||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.MouseSpeed),
|
||||
Bindable = (BindableDouble)config.GetWeldedBindable<double>(OsuConfig.MouseSpeed),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Raw input",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.RawInput)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.RawInput)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Map absolute raw input to the osu! window",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
|
||||
},
|
||||
new OptionEnumDropDown<ConfineMouseMode>
|
||||
{
|
||||
LabelText = "Confine mouse cursor",
|
||||
Bindable = config.GetBindable<ConfineMouseMode>(OsuConfig.ConfineMouse),
|
||||
Bindable = config.GetWeldedBindable<ConfineMouseMode>(OsuConfig.ConfineMouse),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse wheel in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse buttons in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Cursor ripples",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.CursorRipple)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.CursorRipple)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Input
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "OS TabletPC support",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Tablet)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.Tablet)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Wiimote/TaTaCon Drum Support",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Wiimote)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.Wiimote)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,32 +20,32 @@ namespace osu.Game.Overlays.Options.Sections.Online
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Filter offensive words",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatFilter)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ChatFilter)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Filter foreign characters",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatRemoveForeign)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ChatRemoveForeign)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Log private messages",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.LogPrivateMessages)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.LogPrivateMessages)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Block private messages from non-friends",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.BlockNonFriendPM)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.BlockNonFriendPM)
|
||||
},
|
||||
new OptionLabel { Text = "Chat ignore list (space-seperated list)" },
|
||||
new OptionTextBox {
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Bindable = config.GetBindable<string>(OsuConfig.IgnoreList)
|
||||
Bindable = config.GetWeldedBindable<string>(OsuConfig.IgnoreList)
|
||||
},
|
||||
new OptionLabel { Text = "Chat highlight words (space-seperated list)" },
|
||||
new OptionTextBox {
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Bindable = config.GetBindable<string>(OsuConfig.HighlightWords)
|
||||
Bindable = config.GetWeldedBindable<string>(OsuConfig.HighlightWords)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,22 +20,22 @@ namespace osu.Game.Overlays.Options.Sections.Online
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Integrate with Yahoo! status display",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.YahooIntegration)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.YahooIntegration)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Integrate with MSN Live status display",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MsnIntegration)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.MsnIntegration)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Automatically start osu!direct downloads",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticDownload)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.AutomaticDownload)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Prefer no-video downloads",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticDownloadNoVideo)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.AutomaticDownloadNoVideo)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,32 +20,32 @@ namespace osu.Game.Overlays.Options.Sections.Online
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Enable chat ticker",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Ticker)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.Ticker)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show a notification popup when someone says your name",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatHighlightName)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ChatHighlightName)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show chat message notifications",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatMessageNotification)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ChatMessageNotification)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Play a sound when someone says your name",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.ChatAudibleHighlight)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.ChatAudibleHighlight)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show notification popups instantly during gameplay",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.PopupDuringGameplay)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.PopupDuringGameplay)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Show notification popups when friends change status",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.NotifyFriends)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.NotifyFriends)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -20,12 +20,12 @@ namespace osu.Game.Overlays.Options.Sections.Online
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Share your city location with others",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.DisplayCityLocation)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.DisplayCityLocation)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Allow multiplayer game invites from all users",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AllowPublicInvites)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.AllowPublicInvites)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -42,32 +42,32 @@ namespace osu.Game.Overlays.Options.Sections
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Ignore all beatmap skins",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.IgnoreBeatmapSkins)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.IgnoreBeatmapSkins)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Use skin's sound samples",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.SkinSamples)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.SkinSamples)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Use Taiko skin for Taiko mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.UseTaikoSkin)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.UseTaikoSkin)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Always use skin cursor",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.UseSkinCursor)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.UseSkinCursor)
|
||||
},
|
||||
new OptionSlider<double>
|
||||
{
|
||||
LabelText = "Cursor size",
|
||||
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.CursorSize)
|
||||
Bindable = (BindableDouble)config.GetWeldedBindable<double>(OsuConfig.CursorSize)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Automatic cursor size",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AutomaticCursorSizing)
|
||||
Bindable = config.GetWeldedBindable<bool>(OsuConfig.AutomaticCursorSizing)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -24,43 +24,20 @@ namespace osu.Game.Screens
|
||||
|
||||
protected new OsuGameBase Game => base.Game as OsuGameBase;
|
||||
|
||||
private bool boundToBeatmap;
|
||||
private Bindable<WorkingBeatmap> beatmap;
|
||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
public WorkingBeatmap Beatmap
|
||||
{
|
||||
get
|
||||
{
|
||||
bindBeatmap();
|
||||
return beatmap.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
bindBeatmap();
|
||||
beatmap.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
private void bindBeatmap()
|
||||
{
|
||||
if (beatmap == null)
|
||||
beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
if (!boundToBeatmap)
|
||||
{
|
||||
beatmap.ValueChanged += beatmap_ValueChanged;
|
||||
boundToBeatmap = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
if (boundToBeatmap)
|
||||
beatmap.ValueChanged -= beatmap_ValueChanged;
|
||||
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
|
||||
private void beatmap_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
OnBeatmapChanged(beatmap.Value);
|
||||
@ -69,19 +46,8 @@ namespace osu.Game.Screens
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuGameBase game)
|
||||
{
|
||||
if (beatmap == null)
|
||||
beatmap = game?.Beatmap;
|
||||
}
|
||||
|
||||
public override bool Push(Screen screen)
|
||||
{
|
||||
OsuScreen nextOsu = screen as OsuScreen;
|
||||
if (nextOsu != null)
|
||||
{
|
||||
nextOsu.beatmap = beatmap;
|
||||
}
|
||||
|
||||
return base.Push(screen);
|
||||
beatmap.Weld(game?.Beatmap);
|
||||
beatmap.ValueChanged += beatmap_ValueChanged;
|
||||
}
|
||||
|
||||
protected virtual void OnBeatmapChanged(WorkingBeatmap beatmap)
|
||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Play
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuGameBase game, OsuConfigManager config)
|
||||
{
|
||||
dimLevel = config.GetBindable<int>(OsuConfig.DimLevel);
|
||||
dimLevel = config.GetWeldedBindable<int>(OsuConfig.DimLevel);
|
||||
try
|
||||
{
|
||||
if (Beatmap == null)
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Screens.Play
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
mouseDisabled = config.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
mouseDisabled = config.GetWeldedBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
?? new Bindable<bool>(false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user