mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
a
This commit is contained in:
1 parent
820de6f0b3
commit
491677eb2e
3 files changed
+17
-3
No files matched your search
@@ -429,7 +429,6 @@ public class Main : BasePlugin
|
|||||||
Preset18 = Config.Bind("Preset Name Options", "Preset18", "Preset_18");
|
Preset18 = Config.Bind("Preset Name Options", "Preset18", "Preset_18");
|
||||||
Preset19 = Config.Bind("Preset Name Options", "Preset19", "Preset_19");
|
Preset19 = Config.Bind("Preset Name Options", "Preset19", "Preset_19");
|
||||||
Preset20 = Config.Bind("Preset Name Options", "Preset20", "Preset_20");
|
Preset20 = Config.Bind("Preset Name Options", "Preset20", "Preset_20");
|
||||||
Config.Bind("Other", "WebhookURL", "none");
|
|
||||||
BetaBuildUrl = Config.Bind("Other", "BetaBuildURL", string.Empty);
|
BetaBuildUrl = Config.Bind("Other", "BetaBuildURL", string.Empty);
|
||||||
MessageWait = Config.Bind("Other", "MessageWait", 0);
|
MessageWait = Config.Bind("Other", "MessageWait", 0);
|
||||||
LastKillCooldown = Config.Bind("Other", "LastKillCooldown", (float)30);
|
LastKillCooldown = Config.Bind("Other", "LastKillCooldown", (float)30);
|
||||||
|
|||||||
+12
-1
@@ -7,6 +7,7 @@ namespace EHR;
|
|||||||
public class SimpleButton
|
public class SimpleButton
|
||||||
{
|
{
|
||||||
private static PassiveButton BaseButton;
|
private static PassiveButton BaseButton;
|
||||||
|
private static BoxCollider2D ButtonCollider;
|
||||||
|
|
||||||
/// <summary>Creates a new button</summary>
|
/// <summary>Creates a new button</summary>
|
||||||
/// <param name="parent">Parent object</param>
|
/// <param name="parent">Parent object</param>
|
||||||
@@ -33,7 +34,7 @@ public class SimpleButton
|
|||||||
Label = Button.transform.Find("FontPlacer/Text_TMP").GetComponent<TextMeshPro>();
|
Label = Button.transform.Find("FontPlacer/Text_TMP").GetComponent<TextMeshPro>();
|
||||||
NormalSprite = Button.inactiveSprites.GetComponent<SpriteRenderer>();
|
NormalSprite = Button.inactiveSprites.GetComponent<SpriteRenderer>();
|
||||||
HoverSprite = Button.activeSprites.GetComponent<SpriteRenderer>();
|
HoverSprite = Button.activeSprites.GetComponent<SpriteRenderer>();
|
||||||
Button.GetComponent<BoxCollider2D>();
|
ButtonCollider = Button.GetComponent<BoxCollider2D>();
|
||||||
|
|
||||||
// Center the label
|
// Center the label
|
||||||
Transform container = Label.transform.parent;
|
Transform container = Label.transform.parent;
|
||||||
@@ -55,6 +56,16 @@ public class SimpleButton
|
|||||||
public TextMeshPro Label { get; }
|
public TextMeshPro Label { get; }
|
||||||
public SpriteRenderer NormalSprite { get; }
|
public SpriteRenderer NormalSprite { get; }
|
||||||
public SpriteRenderer HoverSprite { get; }
|
public SpriteRenderer HoverSprite { get; }
|
||||||
|
|
||||||
|
public Vector2 Scale
|
||||||
|
{
|
||||||
|
set => NormalSprite.size = HoverSprite.size = ButtonCollider.size = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float FontSize
|
||||||
|
{
|
||||||
|
set => Label.fontSize = Label.fontSizeMin = Label.fontSizeMax = value;
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetBase(PassiveButton passiveButton)
|
public static void SetBase(PassiveButton passiveButton)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -715,7 +715,11 @@ internal static class SetEverythingUpPatch
|
|||||||
Main.ShowResult = setToActive;
|
Main.ShowResult = setToActive;
|
||||||
ResultsToggleButton.Label.text = GetString(setToActive ? "HideResults" : "ShowResults");
|
ResultsToggleButton.Label.text = GetString(setToActive ? "HideResults" : "ShowResults");
|
||||||
},
|
},
|
||||||
GetString(showInitially ? "HideResults" : "ShowResults"));
|
GetString(showInitially ? "HideResults" : "ShowResults"))
|
||||||
|
{
|
||||||
|
Scale = new(1.5f, 0.5f),
|
||||||
|
FontSize = 2f
|
||||||
|
};
|
||||||
|
|
||||||
if (Options.CurrentGameMode == CustomGameMode.Standard)
|
if (Options.CurrentGameMode == CustomGameMode.Standard)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user