mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Update to latest DI stuff
This commit is contained in:
@ -1,43 +1,55 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class MouseOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class MouseOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Mouse";
|
||||
|
||||
private CheckBoxOption rawInput, mapRawInput, disableWheel, disableButtons, enableRipples;
|
||||
|
||||
public MouseOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "Sensitivity: TODO slider" },
|
||||
rawInput = new CheckBoxOption { LabelText = "Raw input" },
|
||||
mapRawInput = new CheckBoxOption { LabelText = "Map absolute raw input to the osu! window" },
|
||||
new SpriteText { Text = "Confine mouse cursor: TODO dropdown" },
|
||||
disableWheel = new CheckBoxOption { LabelText = "Disable mouse wheel in play mode" },
|
||||
disableButtons = new CheckBoxOption { LabelText = "Disable mouse buttons in play mode" },
|
||||
enableRipples = new CheckBoxOption { LabelText = "Cursor ripples" },
|
||||
};
|
||||
private CheckBoxOption rawInput, mapRawInput, disableWheel, disableButtons, enableRipples;
|
||||
|
||||
public MouseOptions()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
rawInput.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.RawInput);
|
||||
mapRawInput.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow);
|
||||
disableWheel.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MouseDisableWheel);
|
||||
disableButtons.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.MouseDisableButtons);
|
||||
enableRipples.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.CursorRipple);
|
||||
}
|
||||
}
|
||||
}
|
||||
new SpriteText { Text = "Sensitivity: TODO slider" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Raw input",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.RawInput)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Map absolute raw input to the osu! window",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
|
||||
},
|
||||
new SpriteText { Text = "Confine mouse cursor: TODO dropdown" },
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Disable mouse wheel in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Disable mouse buttons in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Cursor ripples",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.CursorRipple)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,35 +1,32 @@
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class OtherInputOptions : OptionsSubsection
|
||||
{
|
||||
namespace osu.Game.Overlays.Options.Input
|
||||
{
|
||||
public class OtherInputOptions : OptionsSubsection
|
||||
{
|
||||
protected override string Header => "Other";
|
||||
|
||||
private CheckBoxOption tabletSupport, wiimoteSupport;
|
||||
|
||||
public OtherInputOptions()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
tabletSupport = new CheckBoxOption { LabelText = "OS TabletPC support" },
|
||||
wiimoteSupport = new CheckBoxOption { LabelText = "Wiimote/TaTaCon Drum Support" },
|
||||
};
|
||||
}
|
||||
|
||||
protected override void Load(BaseGame game)
|
||||
[Initializer]
|
||||
private void Load(OsuConfigManager config)
|
||||
{
|
||||
base.Load(game);
|
||||
var osuGame = game as OsuGameBase;
|
||||
if (osuGame != null)
|
||||
Children = new Drawable[]
|
||||
{
|
||||
tabletSupport.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Tablet);
|
||||
wiimoteSupport.Bindable = osuGame.Config.GetBindable<bool>(OsuConfig.Wiimote);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "OS TabletPC support",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Tablet)
|
||||
},
|
||||
new CheckBoxOption
|
||||
{
|
||||
LabelText = "Wiimote/TaTaCon Drum Support",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.Wiimote)
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user