Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this works too #195

Merged
merged 2 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions OWML.Common/Menus/IModMainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public interface IModMainMenu : IModOWMenu
{
IModTabbedMenu OptionsMenu { get; }
IModButton OptionsButton { get; }
IModButton QuitButton { get; }
new IModTabbedMenu OptionsMenu { get; }
new IModButton OptionsButton { get; }
new IModButton QuitButton { get; }
Comment on lines +5 to +7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes the warnings 🤷

IModButton ResumeExpeditionButton { get; }
IModButton NewExpeditionButton { get; }
IModButton ViewCreditsButton { get; }
Expand Down
2 changes: 0 additions & 2 deletions OWML.Common/Menus/IModMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public interface IModMenu
IModButton GetTitleButton(string title);
IModPromptButton GetPromptButton(string title);

IModButton AddButton(IModButton button);
IModButton AddButton(IModButton button, int index);
IModButtonBase AddButton(IModButtonBase button);
IModButtonBase AddButton(IModButtonBase button, int index);

Expand Down
6 changes: 3 additions & 3 deletions OWML.Common/Menus/IModPauseMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public interface IModPauseMenu : IModPopupMenu, IModOWMenu
{
IModTabbedMenu OptionsMenu { get; }
IModButton OptionsButton { get; }
IModButton QuitButton { get; }
new IModTabbedMenu OptionsMenu { get; }
new IModButton OptionsButton { get; }
new IModButton QuitButton { get; }
IModButton ResumeButton { get; }

void Initialize(SettingsManager settingsManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace OWML.ModHelper.Menus
{
public abstract class ModButton : IModButtonBase
public abstract class ModButtonBase : IModButtonBase
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less confusing for me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, why not

{
public event Action OnClick;

Expand All @@ -27,7 +27,7 @@ public int Index

private readonly UIStyleApplier _uIStyleApplier;

protected ModButton(Button button, IModMenu menu)
protected ModButtonBase(Button button, IModMenu menu)
{
_uIStyleApplier = button.GetComponent<UIStyleApplier>();
Button = button;
Expand Down
2 changes: 1 addition & 1 deletion OWML.ModHelper.Menus/ModLayoutButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace OWML.ModHelper.Menus
{
public class ModLayoutButton : ModButton, IModLayoutButton
public class ModLayoutButton : ModButtonBase, IModLayoutButton
{
public IModLayoutManager Layout { get; }

Expand Down
12 changes: 0 additions & 12 deletions OWML.ModHelper.Menus/ModMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,6 @@ public Button AddButton(string title, int index)
return copy.Button;
}

[Obsolete("use IModButtonBase")]
public IModButton AddButton(IModButton button)
{
return AddButton(button, button.Index);
}

[Obsolete("use IModButtonBase")]
public virtual IModButton AddButton(IModButton button, int index)
{
return (IModButton)AddButton((IModButtonBase)button, index);
}

public IModButtonBase AddButton(IModButtonBase button)
{
return AddButton(button, button.Index);
Expand Down
2 changes: 1 addition & 1 deletion OWML.ModHelper.Menus/ModTitleButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace OWML.ModHelper.Menus
{
public class ModTitleButton : ModButton, IModButton
public class ModTitleButton : ModButtonBase, IModButton
{
private readonly Text _text;
public virtual string Title
Expand Down
2 changes: 1 addition & 1 deletion OWML.ModHelper.Menus/OWML.ModHelper.Menus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<Compile Include="ModInputCombinationMenu.cs" />
<Compile Include="ModInputCombinationPopup.cs" />
<Compile Include="ModLayoutButton.cs" />
<Compile Include="ModButton.cs" />
<Compile Include="ModButtonBase.cs" />
<Compile Include="ModConfigMenuBase.cs" />
<Compile Include="ModTitleButton.cs" />
<Compile Include="ModConfigMenu.cs" />
Expand Down