Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
Binary file modified TLM/TLM/Resources/MainMenu/MainMenuButton-bg-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/MainMenuButton-bg-hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/MainMenuButton-bg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/MainMenuButton-fg-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/MainMenuButton-fg-hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/MainMenuButton-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/ClearTraffic-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/Help-fg-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/Help-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/LaneArrows-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/LaneConnector-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/ManualTL-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/ParkingRestrictions-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/PrioritySigns-fg-normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/RoundButton-bg-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/RoundButton-bg-disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/RoundButton-bg-hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/RoundButton-bg-normal.png
Diff not rendered.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/SpeedLimits-fg-normal.png
Diff not rendered.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/TimedTL-fg-normal.png
Diff not rendered.
Binary file modified TLM/TLM/Resources/MainMenu/Tool/ToggleTL-fg-normal.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/TrafficDespawning-fg-active.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/TrafficDespawning-fg-normal.png
Diff not rendered.
2,152 changes: 2,152 additions & 0 deletions TLM/TLM/Resources/UI-buttons.svg

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions TLM/TLM/TLM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@
<EmbeddedResource Include="Resources\MainMenu\LegacyButtons.png" />
<EmbeddedResource Include="Resources\MainMenu\noimage.png" />
<EmbeddedResource Include="Resources\MainMenu\remove-btn.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\Help-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\Help-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\WindowBackground.png" />
<EmbeddedResource Include="Resources\clear.png" />
Expand Down Expand Up @@ -958,32 +957,20 @@
<EmbeddedResource Include="Resources\MainMenu\MainMenuButton-fg-hovered.png" />
<EmbeddedResource Include="Resources\MainMenu\MainMenuButton-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ToggleTL-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ToggleTL-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ManualTL-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ManualTL-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\TimedTL-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\TimedTL-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\LaneArrows-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\LaneArrows-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\LaneConnector-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\LaneConnector-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ClearTraffic-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ClearTraffic-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\RoundButton-bg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\RoundButton-bg-disabled.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\RoundButton-bg-hovered.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\RoundButton-bg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\TrafficDespawning-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\TrafficDespawning-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ParkingRestrictions-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\ParkingRestrictions-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\SpeedLimits-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\SpeedLimits-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\JunctionRestrictions-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\JunctionRestrictions-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\PrioritySigns-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\PrioritySigns-fg-normal.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\VehicleRestrictions-fg-active.png" />
<EmbeddedResource Include="Resources\MainMenu\Tool\VehicleRestrictions-fg-normal.png" />
<EmbeddedResource Include="Resources\LaneArrows\LaneArrow-bg-active.png" />
<EmbeddedResource Include="Resources\LaneArrows\LaneArrow-bg-disabled.png" />
Expand Down Expand Up @@ -1151,6 +1138,12 @@
<ItemGroup>
<EmbeddedResource Include="Resources\LaneConnectionManager\direction_arrow.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\MainMenu\Tool\Help-fg-active.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\MainMenu\Tool\RoundButton-bg-active.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="PostBuildMacros">
<!-- Code from https://superuser.com/questions/82231/how-do-i-do-comments-at-a-windows-command-prompt -->
Expand Down
15 changes: 15 additions & 0 deletions TLM/TLM/U/AtlasBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
namespace TrafficManager.U {
using System;
using System.Collections.Generic;
using System.Linq;
using ColossalFramework.UI;
using TrafficManager.Util;
using TrafficManager.Util.Extensions;
using UnityEngine;

/// <summary>
/// Populates a set of spritedefs as your UI form is populated with controls. Allows to use
Expand Down Expand Up @@ -46,6 +48,19 @@ public void Add(AtlasSpriteDef spriteDef) {
this.spriteDefs_.Add(spriteDef);
}

/// <summary>
/// Find and override
/// </summary>
/// <param name="name"></param>
public void OverrideGetTextureFor(string name, Func<Texture2D> getTexture) {
foreach (var sd in this.spriteDefs_) {
if (sd.Name == name) {
sd.GetTexture = getTexture;
return;
}
}
}

/// <summary>Following the settings in the Skin fields, load sprites into an UI atlas.
/// Longer list of atlas keys can be loaded into one atlas.</summary>
/// <returns>New UI atlas.</returns>
Expand Down
37 changes: 37 additions & 0 deletions TLM/TLM/U/AtlasSpriteDef.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
namespace TrafficManager.U {
using System;
using CSUtil.Commons;
using JetBrains.Annotations;
using TrafficManager.UI.Textures;
using TrafficManager.Util;
using UnityEngine;

/// <summary>
/// Defines a sprite to be loaded into a Sprite Atlas (usually for buttons and other UI elements).
Expand All @@ -17,6 +21,17 @@ public class AtlasSpriteDef : IEquatable<AtlasSpriteDef> {
/// <summary>Texture size assumed by the developer.</summary>
public IntVector2 Size;

/// <summary>If defined, this will be used instead of loading a DLL resource.</summary>
[CanBeNull]
public Func<Texture2D> GetTexture;

/// <summary>
/// Initializes a new instance of the <see cref="AtlasSpriteDef"/> class.
/// Set <see cref="GetTexture"/> to override DLL resource loading and provide an existing
/// Texture2D from elsewhere, like pick a sign from a theme for example.
/// </summary>
/// <param name="name">Texture filename without PNG.</param>
/// <param name="size">Size hint in pixels.</param>
public AtlasSpriteDef(string name, IntVector2 size) {
Name = name;
Size = size;
Expand All @@ -25,5 +40,27 @@ public AtlasSpriteDef(string name, IntVector2 size) {
public bool Equals(AtlasSpriteDef other) {
return other != null && this.Name == other.Name;
}

public Texture2D LoadTexture2D(bool debugResourceLoading, string prefix) {
if (this.GetTexture != null) {
return this.GetTexture();
}

// Allow spritedef resouce prefix to override prefix given to this func
string resourceName = this.Name.StartsWith("/")
? $"{this.Name.Substring(1)}.png"
: $"{prefix}.{this.Name}.png";

//--------------------------
// Try loading the texture
//--------------------------
if (debugResourceLoading) {
Log._Debug($"AtlasSpriteDef: Loading {resourceName} for sprite={this.Name}");
}

return TextureResources.LoadDllResource(
resourceName: resourceName,
size: this.Size);
}
}
}
36 changes: 8 additions & 28 deletions TLM/TLM/U/TextureUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace TrafficManager.U {
using System.Collections.Generic;
using ColossalFramework.UI;
using CSUtil.Commons;
using TrafficManager.State;
using JetBrains.Annotations;
using TrafficManager.State.ConfigData;
using TrafficManager.UI.Textures;
using UnityEngine;
Expand All @@ -24,7 +24,7 @@ public static class TextureUtil {
/// <param name="atlasSizeHint">Texture with this side size is created.</param>
public static UITextureAtlas CreateAtlas(string atlasName,
string resourcePrefix,
U.AtlasSpriteDef[] spriteDefs,
[NotNull] U.AtlasSpriteDef[] spriteDefs,
IntVector2 atlasSizeHint) {
var loadedTextures = new List<Texture2D>(spriteDefs.Length);
var loadedSpriteNames = new List<string>();
Expand All @@ -36,28 +36,7 @@ public static UITextureAtlas CreateAtlas(string atlasName,

// Load separate sprites and then pack it in a texture together
foreach (U.AtlasSpriteDef spriteDef in spriteDefs) {
// Allow spritedef resouce prefix to override prefix given to this func
string prefix = resourcePrefix;
string resourceName;

if (spriteDef.Name.StartsWith("/")) {
// If sprite name starts with /, use it as full resource path without .PNG
resourceName = $"{spriteDef.Name.Substring(1)}.png";
} else {
// Otherwise use prefix + sprite name + .PNG
resourceName = $"{prefix}.{spriteDef.Name}.png";
}

//--------------------------
// Try loading the texture
//--------------------------
if (debugResourceLoading) {
Log._Debug($"TextureUtil: Loading {resourceName} for sprite={spriteDef.Name}");
}

Texture2D tex = TextureResources.LoadDllResource(
resourceName: resourceName,
size: spriteDef.Size);
Texture2D tex = spriteDef.LoadTexture2D(debugResourceLoading, resourcePrefix);

if (tex != null) {
loadedTextures.Add(tex);
Expand All @@ -75,10 +54,10 @@ public static UITextureAtlas CreateAtlas(string atlasName,
return PackTextures(atlasName, atlasSizeHint, loadedTextures, loadedSpriteNames);
}

private static UITextureAtlas PackTextures(string atlasName,
private static UITextureAtlas PackTextures([NotNull] string atlasName,
IntVector2 atlasSizeHint,
List<Texture2D> loadedTextures,
List<string> loadedSpriteNames) {
[NotNull] List<Texture2D> loadedTextures,
[NotNull] List<string> loadedSpriteNames) {
Texture2D texture2D = new Texture2D(
width: atlasSizeHint.x,
height: atlasSizeHint.y,
Expand Down Expand Up @@ -115,7 +94,8 @@ private static UITextureAtlas PackTextures(string atlasName,
/// <param name="tex">Copy from.</param>
/// <param name="alpha">New alpha.</param>
/// <returns>New texture.</returns>
public static Texture2D AdjustAlpha(Texture2D tex, float alpha) {
public static Texture2D AdjustAlpha([NotNull] Texture2D tex,
float alpha) {
Color[] texColors = tex.GetPixels();
Color[] retPixels = new Color[texColors.Length];

Expand Down
10 changes: 5 additions & 5 deletions TLM/TLM/UI/MainMenu/ClearTrafficButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace TrafficManager.UI.MainMenu {
public class ClearTrafficButton : BaseMenuButton {
protected override bool IsActive() => false;

protected override string U_OverrideTooltipText() => Translation.Menu.Get("Tooltip:Clear traffic");
protected override string U_OverrideTooltipText() =>
Translation.Menu.Get("Tooltip:Clear traffic");

protected override bool IsVisible() => true;

Expand All @@ -18,11 +19,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
this.Skin = ButtonSkin.CreateSimple(
foregroundPrefix: "ClearTraffic",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanHover(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override void OnClick(UIMouseEventParameter p) {
Expand All @@ -40,4 +40,4 @@ protected override void OnClick(UIMouseEventParameter p) {
base.OnClick(p);
}
}
}
}
2 changes: 1 addition & 1 deletion TLM/TLM/UI/MainMenu/DespawnButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
.CanActivate();
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override void OnClick(UIMouseEventParameter p) {
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/JunctionRestrictionsButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
foregroundPrefix: "JunctionRestrictions",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() =>
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/LaneArrowsMenuButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
foregroundPrefix: "LaneArrows",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() => Translation.Menu.Get("Tooltip:Change lane arrows");
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/LaneConnectorButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public override void SetupButtonSkin(AtlasBuilder atlasBuilder) {
foregroundPrefix: "LaneConnector",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: atlasBuilder,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() =>
Expand Down
10 changes: 2 additions & 8 deletions TLM/TLM/UI/MainMenu/MainMenuButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override void Start() {
sizeHint: new IntVector2(256));
this.Skin.UpdateAtlasBuilder(
atlasBuilder: atlasBuilder,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(64));
this.atlas = atlasBuilder.CreateAtlas();
UpdateButtonSkinAndTooltip();

Expand All @@ -67,13 +67,7 @@ public override void Start() {
}
}

private static float GetButtonDimensions() {
// The new behaviour, scales with screen size but never less than 50px
// var scaledSize = U.UIScaler.ScreenSizeSmallestFraction(0.026f, 0.046f);
// return Mathf.Max(scaledSize, 50f);

return 50f; // always 50px the original behaviour
}
private static float GetButtonDimensions() => 50f; // always 50px the original behaviour

protected override bool IsActive() {
return ModUI.Instance.IsVisible();
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/MainMenuWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void SetupControls(UBuilder builder) {
// By default the atlas will include backgrounds: DefaultRound-bg-normal
tmpSkin.UpdateAtlasBuilder(
atlasBuilder: builder.AtlasBuilder,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));

// Create Version Label and Help button:
// [ TM:PE 11.x ] [?]
Expand Down Expand Up @@ -279,7 +279,7 @@ private UILabel SetupControls_TopRow(UBuilder builder) {
.CanActivate();
skin.UpdateAtlasBuilder(
atlasBuilder: builder.AtlasBuilder,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(80));

osdToggle.Skin = skin;
osdToggle.ApplyButtonSkin();
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/ManualTrafficLightsButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
foregroundPrefix: "ManualTL",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() =>
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/ParkingRestrictionsButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
foregroundPrefix: "ParkingRestrictions",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() =>
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/PrioritySignsButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
foregroundPrefix: "PrioritySigns",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() =>
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/UI/MainMenu/SpeedLimitsButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public override void SetupButtonSkin(AtlasBuilder futureAtlas) {
foregroundPrefix: "SpeedLimits",
backgroundPrefix: UConst.MAINMENU_ROUND_BUTTON_BG)
.CanHover(foreground: false)
.CanActivate();
.CanActivate(foreground: false);
this.Skin.UpdateAtlasBuilder(
atlasBuilder: futureAtlas,
spriteSize: new IntVector2(50));
spriteSize: new IntVector2(128));
}

protected override string U_OverrideTooltipText() => Translation.Menu.Get("Tooltip:Speed limits");
Expand Down
Loading