Make many internal classes and methods public

This is important when using dynamic compiling to rapidly iterate. Until we actually split projects out into pieces (like the abstract ruleset project we have talked about) there is no advantage to using internal in the osu! game code.
This commit is contained in:
Dean Herbert 2017-11-21 11:49:42 +09:00
parent 2080a2fb02
commit 4f6263ef86
62 changed files with 81 additions and 81 deletions

View File

@ -7,7 +7,7 @@
namespace osu.Game.Beatmaps.Drawables
{
internal class BeatmapBackgroundSprite : Sprite
public class BeatmapBackgroundSprite : Sprite
{
private readonly WorkingBeatmap working;

View File

@ -11,7 +11,7 @@
namespace osu.Game.Beatmaps
{
internal class DummyWorkingBeatmap : WorkingBeatmap
public class DummyWorkingBeatmap : WorkingBeatmap
{
private readonly OsuGameBase game;

View File

@ -66,7 +66,7 @@ public string Text
}
private float textSize = 28;
internal float TextSize
public float TextSize
{
get
{

View File

@ -11,7 +11,7 @@
namespace osu.Game.Graphics.UserInterface.Volume
{
internal class VolumeControl : OverlayContainer
public class VolumeControl : OverlayContainer
{
private readonly VolumeMeter volumeMeterMaster;
@ -119,4 +119,4 @@ private void schedulePopOut()
this.Delay(1000).Schedule(Hide, out popOutDelegate);
}
}
}
}

View File

@ -8,7 +8,7 @@
namespace osu.Game.Graphics.UserInterface.Volume
{
internal class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>
public class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>
{
public Func<GlobalAction, bool> ActionRequested;

View File

@ -13,7 +13,7 @@
namespace osu.Game.Graphics.UserInterface.Volume
{
internal class VolumeMeter : Container, IKeyBindingHandler<GlobalAction>
public class VolumeMeter : Container, IKeyBindingHandler<GlobalAction>
{
private readonly Box meterFill;
public BindableDouble Bindable { get; } = new BindableDouble();
@ -108,4 +108,4 @@ public bool OnPressed(GlobalAction action)
public bool OnReleased(GlobalAction action) => false;
}
}
}

View File

@ -6,7 +6,7 @@
namespace osu.Game.Online.API
{
internal class OAuth
public class OAuth
{
private readonly string clientId;
private readonly string clientSecret;

View File

@ -8,7 +8,7 @@
namespace osu.Game.Online.API
{
[Serializable]
internal class OAuthToken
public class OAuthToken
{
/// <summary>
/// OAuth 2.0 access token.

View File

@ -100,7 +100,7 @@ public override Drawable GetIcon(OsuColour colours, float size)
}
}
internal class VersusRow : FillFlowContainer
public class VersusRow : FillFlowContainer
{
public VersusRow(Color4 first, Color4 second, float size)
{

View File

@ -58,7 +58,7 @@ public class ChatOverlay : OsuFocusedOverlayContainer, IOnlineComponent
private readonly Box chatBackground;
private readonly Box tabBackground;
public Bindable<double> ChatHeight { get; internal set; }
public Bindable<double> ChatHeight { get; public set; }
private readonly Container channelSelectionContainer;
private readonly ChannelSelectionOverlay channelSelection;

View File

@ -19,7 +19,7 @@
namespace osu.Game.Overlays.KeyBinding
{
internal class KeyBindingRow : Container, IFilterable
public class KeyBindingRow : Container, IFilterable
{
private readonly object action;
private readonly IEnumerable<Framework.Input.Bindings.KeyBinding> bindings;

View File

@ -55,7 +55,7 @@ private void load(KeyBindingStore store)
}
}
internal class ResetButton : OsuButton
public class ResetButton : OsuButton
{
[BackgroundDependencyLoader]
private void load(OsuColour colours)

View File

@ -13,7 +13,7 @@
namespace osu.Game.Overlays
{
internal class LoginOverlay : OsuFocusedOverlayContainer
public class LoginOverlay : OsuFocusedOverlayContainer
{
private LoginSettings settingsSection;

View File

@ -13,7 +13,7 @@
namespace osu.Game.Overlays.Music
{
internal class FilterControl : Container
public class FilterControl : Container
{
public readonly FilterTextBox Search;

View File

@ -17,7 +17,7 @@
namespace osu.Game.Overlays.Music
{
internal class PlaylistItem : Container, IFilterable, IDraggable
public class PlaylistItem : Container, IFilterable, IDraggable
{
private const float fade_duration = 100;

View File

@ -14,7 +14,7 @@
namespace osu.Game.Overlays.Music
{
internal class PlaylistList : CompositeDrawable
public class PlaylistList : CompositeDrawable
{
public Action<BeatmapSetInfo> OnSelect;

View File

@ -135,7 +135,7 @@ private void load(OsuColour colours)
private class RestoreDefaultValueButton : Box, IHasTooltip
{
private Bindable<T> bindable;
internal Bindable<T> Bindable
public Bindable<T> Bindable
{
get { return bindable; }
set
@ -185,13 +185,13 @@ protected override void OnHoverLost(InputState state)
UpdateState();
}
internal void SetButtonColour(Color4 buttonColour)
public void SetButtonColour(Color4 buttonColour)
{
this.buttonColour = buttonColour;
UpdateState();
}
internal void UpdateState()
public void UpdateState()
{
if (bindable == null)
return;

View File

@ -7,7 +7,7 @@
namespace osu.Game.Overlays.Settings
{
internal class SettingsLabel : SettingsItem<string>
public class SettingsLabel : SettingsItem<string>
{
protected override Drawable CreateControl() => null;

View File

@ -18,8 +18,8 @@ namespace osu.Game.Overlays.Settings
public class Sidebar : Container<SidebarButton>, IStateful<ExpandedState>
{
private readonly FillFlowContainer<SidebarButton> content;
internal const float DEFAULT_WIDTH = ToolbarButton.WIDTH;
internal const int EXPANDED_WIDTH = 200;
public const float DEFAULT_WIDTH = ToolbarButton.WIDTH;
public const int EXPANDED_WIDTH = 200;
public event Action<ExpandedState> StateChanged;
@ -137,4 +137,4 @@ public enum ExpandedState
Contracted,
Expanded,
}
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays
{
public abstract class SettingsOverlay : OsuFocusedOverlayContainer
{
internal const float CONTENT_MARGINS = 10;
public const float CONTENT_MARGINS = 10;
public const float TRANSITION_LENGTH = 600;

View File

@ -6,7 +6,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarChatButton : ToolbarOverlayToggleButton
public class ToolbarChatButton : ToolbarOverlayToggleButton
{
public ToolbarChatButton()
{
@ -19,4 +19,4 @@ private void load(ChatOverlay chat)
StateContainer = chat;
}
}
}
}

View File

@ -6,7 +6,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarDirectButton : ToolbarOverlayToggleButton
public class ToolbarDirectButton : ToolbarOverlayToggleButton
{
public ToolbarDirectButton()
{
@ -19,4 +19,4 @@ private void load(DirectOverlay direct)
StateContainer = direct;
}
}
}
}

View File

@ -5,7 +5,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarHomeButton : ToolbarButton
public class ToolbarHomeButton : ToolbarButton
{
public ToolbarHomeButton()
{
@ -14,4 +14,4 @@ public ToolbarHomeButton()
TooltipSub = "Return to the main menu";
}
}
}
}

View File

@ -14,7 +14,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarModeSelector : Container
public class ToolbarModeSelector : Container
{
private const float padding = 10;

View File

@ -6,7 +6,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarMusicButton : ToolbarOverlayToggleButton
public class ToolbarMusicButton : ToolbarOverlayToggleButton
{
public ToolbarMusicButton()
{
@ -19,4 +19,4 @@ private void load(MusicController music)
StateContainer = music;
}
}
}
}

View File

@ -7,7 +7,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarNotificationButton : ToolbarOverlayToggleButton
public class ToolbarNotificationButton : ToolbarOverlayToggleButton
{
protected override Anchor TooltipAnchor => Anchor.TopRight;
@ -24,4 +24,4 @@ private void load(NotificationOverlay notificationOverlay)
StateContainer = notificationOverlay;
}
}
}
}

View File

@ -9,7 +9,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarOverlayToggleButton : ToolbarButton
public class ToolbarOverlayToggleButton : ToolbarButton
{
private readonly Box stateBackground;

View File

@ -6,7 +6,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarSettingsButton : ToolbarOverlayToggleButton
public class ToolbarSettingsButton : ToolbarOverlayToggleButton
{
public ToolbarSettingsButton()
{
@ -21,4 +21,4 @@ private void load(SettingsOverlay settings)
StateContainer = settings;
}
}
}
}

View File

@ -6,7 +6,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarSocialButton : ToolbarOverlayToggleButton
public class ToolbarSocialButton : ToolbarOverlayToggleButton
{
public ToolbarSocialButton()
{
@ -19,4 +19,4 @@ private void load(SocialOverlay chat)
StateContainer = chat;
}
}
}
}

View File

@ -9,7 +9,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarUserArea : Container
public class ToolbarUserArea : Container
{
public LoginOverlay LoginOverlay;
private ToolbarUserButton button;

View File

@ -12,7 +12,7 @@
namespace osu.Game.Overlays.Toolbar
{
internal class ToolbarUserButton : ToolbarButton, IOnlineComponent
public class ToolbarUserButton : ToolbarButton, IOnlineComponent
{
private readonly UpdateableAvatar avatar;

View File

@ -20,12 +20,12 @@ public class Judgement
/// <summary>
/// The combo prior to this judgement occurring.
/// </summary>
internal int ComboAtJudgement;
public int ComboAtJudgement;
/// <summary>
/// The highest combo achieved prior to this judgement occurring.
/// </summary>
internal int HighestComboAtJudgement;
public int HighestComboAtJudgement;
/// <summary>
/// Whether a successful hit occurred.
@ -41,7 +41,7 @@ public class Judgement
/// The offset from a perfect hit at which this judgement occurred.
/// Populated when added via <see cref="DrawableHitObject{TObject}.AddJudgement"/>.
/// </summary>
public double TimeOffset { get; internal set; }
public double TimeOffset { get; public set; }
/// <summary>
/// Whether the <see cref="Result"/> should affect the combo portion of the score.

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
/// <summary>
/// A HitObjectParser to parse legacy osu!catch Beatmaps.
/// </summary>
internal class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
public class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)
{

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Mania
/// <summary>
/// A HitObjectParser to parse legacy osu!mania Beatmaps.
/// </summary>
internal class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
public class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)
{

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
/// <summary>
/// A HitObjectParser to parse legacy osu! Beatmaps.
/// </summary>
internal class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
public class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)
{

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Objects.Legacy.Taiko
/// <summary>
/// A HitObjectParser to parse legacy osu!taiko Beatmaps.
/// </summary>
internal class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
public class ConvertHitObjectParser : Legacy.ConvertHitObjectParser
{
protected override HitObject CreateHit(Vector2 position, bool newCombo)
{

View File

@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Timing
/// <summary>
/// A <see cref="ScrollingContainer"/> which scrolls linearly relative to the <see cref="MultiplierControlPoint"/> start time.
/// </summary>
internal class LinearScrollingContainer : ScrollingContainer
public class LinearScrollingContainer : ScrollingContainer
{
private readonly MultiplierControlPoint controlPoint;

View File

@ -20,7 +20,7 @@ public abstract class Playfield : Container
/// </summary>
public HitObjectContainer HitObjects { get; protected set; }
internal Container<Drawable> ScaledContent;
public Container<Drawable> ScaledContent;
/// <summary>
/// Whether we are currently providing the local user a gameplay cursor.

View File

@ -61,7 +61,7 @@ public abstract class RulesetContainer : Container
/// A visual representation of a <see cref="Rulesets.Ruleset"/>.
/// </summary>
/// <param name="ruleset">The ruleset being repesented.</param>
internal RulesetContainer(Ruleset ruleset)
public RulesetContainer(Ruleset ruleset)
{
Ruleset = ruleset;
}

View File

@ -3,7 +3,7 @@
namespace osu.Game.Screens.Charts
{
internal class ChartInfo : ScreenWhiteBox
public class ChartInfo : ScreenWhiteBox
{
}
}

View File

@ -6,7 +6,7 @@
namespace osu.Game.Screens.Charts
{
internal class ChartListing : ScreenWhiteBox
public class ChartListing : ScreenWhiteBox
{
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(ChartInfo)

View File

@ -3,7 +3,7 @@
namespace osu.Game.Screens.Direct
{
internal class OnlineListing : ScreenWhiteBox
public class OnlineListing : ScreenWhiteBox
{
}
}

View File

@ -11,7 +11,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
/// <summary>
/// The part of the timeline that displays bookmarks.
/// </summary>
internal class BookmarkPart : TimelinePart
public class BookmarkPart : TimelinePart
{
protected override void LoadBeatmap(WorkingBeatmap beatmap)
{

View File

@ -12,7 +12,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
/// <summary>
/// The part of the timeline that displays breaks in the song.
/// </summary>
internal class BreakPart : TimelinePart
public class BreakPart : TimelinePart
{
protected override void LoadBeatmap(WorkingBeatmap beatmap)
{

View File

@ -14,7 +14,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
/// <summary>
/// The part of the timeline that displays the control points.
/// </summary>
internal class ControlPointPart : TimelinePart
public class ControlPointPart : TimelinePart
{
protected override void LoadBeatmap(WorkingBeatmap beatmap)
{

View File

@ -15,7 +15,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
/// <summary>
/// The part of the timeline that displays the current position of the song.
/// </summary>
internal class MarkerPart : TimelinePart
public class MarkerPart : TimelinePart
{
private readonly Drawable marker;

View File

@ -13,7 +13,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
/// <summary>
/// Represents a part of the summary timeline..
/// </summary>
internal abstract class TimelinePart : CompositeDrawable
public abstract class TimelinePart : CompositeDrawable
{
public Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();

View File

@ -10,7 +10,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
/// <summary>
/// Represents a spanning point on a timeline part.
/// </summary>
internal class DurationVisualisation : Container
public class DurationVisualisation : Container
{
protected DurationVisualisation(double startTime, double endTime)
{

View File

@ -10,7 +10,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
/// <summary>
/// Represents a singular point on a timeline part.
/// </summary>
internal class PointVisualisation : Box
public class PointVisualisation : Box
{
protected PointVisualisation(double startTime)
{

View File

@ -9,7 +9,7 @@
namespace osu.Game.Screens.Edit.Screens.Design
{
internal class Design : EditorScreen
public class Design : EditorScreen
{
public Design()
{

View File

@ -39,10 +39,10 @@ public class ButtonSystem : Container, IStateful<MenuState>
private readonly FlowContainerWithOrigin buttonFlow;
//todo: make these non-internal somehow.
internal const float BUTTON_AREA_HEIGHT = 100;
public const float BUTTON_AREA_HEIGHT = 100;
internal const float BUTTON_WIDTH = 140f;
internal const float WEDGE_WIDTH = 20;
public const float BUTTON_WIDTH = 140f;
public const float WEDGE_WIDTH = 20;
private OsuLogo logo;

View File

@ -25,7 +25,7 @@ public class Intro : OsuScreen
/// <summary>
/// Whether we have loaded the menu previously.
/// </summary>
internal bool DidLoadMenu;
public bool DidLoadMenu;
private MainMenu mainMenu;
private SampleChannel welcome;

View File

@ -226,7 +226,7 @@ public OsuLogo()
/// </summary>
/// <param name="action">The animation to be performed</param>
/// <param name="waitForPrevious">If true, the new animation is delayed until all previous transforms finish. If false, existing transformed are cleared.</param>
internal void AppendAnimatingAction(Action action, bool waitForPrevious)
public void AppendAnimatingAction(Action action, bool waitForPrevious)
{
Action runnableAction = () =>
{

View File

@ -6,7 +6,7 @@
namespace osu.Game.Screens.Multiplayer
{
internal class Lobby : ScreenWhiteBox
public class Lobby : ScreenWhiteBox
{
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(MatchCreate),

View File

@ -12,7 +12,7 @@
namespace osu.Game.Screens.Multiplayer
{
internal class Match : ScreenWhiteBox
public class Match : ScreenWhiteBox
{
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(MatchSongSelect),

View File

@ -6,7 +6,7 @@
namespace osu.Game.Screens.Multiplayer
{
internal class MatchCreate : ScreenWhiteBox
public class MatchCreate : ScreenWhiteBox
{
protected override IEnumerable<Type> PossibleChildren => new[] {
typeof(Match)

View File

@ -14,7 +14,7 @@
namespace osu.Game.Screens.Ranking
{
internal class ResultsPage : Container
public class ResultsPage : Container
{
protected readonly Score Score;
protected readonly WorkingBeatmap Beatmap;

View File

@ -12,7 +12,7 @@
namespace osu.Game.Screens.Ranking
{
internal class ResultsPageRanking : ResultsPage
public class ResultsPageRanking : ResultsPage
{
public ResultsPageRanking(Score score, WorkingBeatmap beatmap = null) : base(score, beatmap)
{
@ -39,4 +39,4 @@ private void load(OsuColour colours)
};
}
}
}
}

View File

@ -26,7 +26,7 @@
namespace osu.Game.Screens.Ranking
{
internal class ResultsPageScore : ResultsPage
public class ResultsPageScore : ResultsPage
{
private ScoreCounter scoreCounter;

View File

@ -23,7 +23,7 @@
namespace osu.Game.Screens.Select
{
internal class BeatmapCarousel : OsuScrollContainer
public class BeatmapCarousel : OsuScrollContainer
{
public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap;
@ -116,7 +116,7 @@ public void RemoveBeatmap(BeatmapSetInfo beatmapSet)
Schedule(() => removeGroup(groups.Find(b => b.BeatmapSet.ID == beatmapSet.ID)));
}
internal void UpdateBeatmap(BeatmapInfo beatmap)
public void UpdateBeatmap(BeatmapInfo beatmap)
{
// todo: this method should not run more than once for the same BeatmapSetInfo.
var set = manager.QueryBeatmapSet(s => s.ID == beatmap.BeatmapSetInfoID);

View File

@ -22,7 +22,7 @@
namespace osu.Game.Screens.Select
{
internal class BeatmapInfoWedge : OverlayContainer
public class BeatmapInfoWedge : OverlayContainer
{
private static readonly Vector2 wedged_container_shear = new Vector2(0.15f, 0);

View File

@ -12,7 +12,7 @@
namespace osu.Game.Screens.Tournament.Components
{
internal class VisualiserContainer : Container
public class VisualiserContainer : Container
{
/// <summary>
/// Number of lines in the visualiser.