Skip to content

Overhauled icons & adjusted UI #1761

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 modified TLM/TLM/Resources/MainMenu/Tool/ClearTraffic-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/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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/LaneArrows-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/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 modified TLM/TLM/Resources/MainMenu/Tool/LaneConnector-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/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 modified TLM/TLM/Resources/MainMenu/Tool/ManualTL-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/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 modified TLM/TLM/Resources/MainMenu/Tool/ParkingRestrictions-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.
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/PrioritySigns-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/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
Binary file modified TLM/TLM/Resources/MainMenu/Tool/RoutingDetector-fg-active.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/RoutingDetector-fg-normal.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/SpeedLimits-fg-active.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/SpeedLimits-fg-normal.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/TimedTL-fg-active.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/TimedTL-fg-normal.png
Binary file modified TLM/TLM/Resources/MainMenu/Tool/ToggleTL-fg-active.png
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
Binary file modified TLM/TLM/Resources/MainMenu/Tool/VehicleRestrictions-fg-active.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/Clear-fg-disabled.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/Clear-fg-normal.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/RoundButton-bg-active.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/RoundButton-bg-disabled.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/RoundButton-bg-hovered.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/Stop_RHT-fg-disabled.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/Stop_RHT-fg-normal.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/Yield_RHT-fg-disabled.png
Binary file modified TLM/TLM/Resources/RoadSelectionPanel/Yield_RHT-fg-normal.png
3 changes: 2 additions & 1 deletion TLM/TLM/U/UBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public TButton Button<TButton>(UIComponent parent,
public TLabel Label<TLabel>(UIComponent parent,
string t,
UStackMode stack = UStackMode.ToTheRight,
float spacing = 0f,
bool processMarkup = false)
where TLabel : UILabel, ISmartSizableControl {
var label = parent.AddUIComponent(typeof(TLabel)) as TLabel;
Expand All @@ -110,7 +111,7 @@ public ULabel Label_(UIComponent parent,
string t,
UStackMode stack = UStackMode.ToTheRight,
bool processMarkup = false) {
return Label<ULabel>(parent, t, stack, processMarkup);
return Label<ULabel>(parent, t, stack, 0f, processMarkup);
}

public TPanel Panel<TPanel>(UIComponent parent,
Expand Down
13 changes: 8 additions & 5 deletions TLM/TLM/UI/MainMenu/MainMenuWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,12 @@ private UILabel SetupControls_TopRow(UBuilder builder) {
//-------------------------------------------------------
// Mod name/version label (also serves as a drag handle)
//-------------------------------------------------------
string titleText = "Traffic Manager : PE";
UILabel versionLabel = builder.Label<U.ULabel>(
parent: this,
t: TrafficManagerMod.ModName,
stack: UStackMode.Below);
t: titleText,
stack: UStackMode.Below,
spacing: 6f);
this.VersionLabel = versionLabel;

//-------------------------------------------------------
Expand All @@ -271,7 +273,7 @@ private UILabel SetupControls_TopRow(UBuilder builder) {
parent: this,
text: string.Empty,
tooltip: Translation.Menu.Get("Tooltip:Toggle onscreen display panel"),
size: new Vector2(18f, 18f),
size: new Vector2(16f, 16f),
stack: UStackMode.None);

this.toggleOsdButton_ = osdToggle;
Expand All @@ -296,7 +298,7 @@ private UILabel SetupControls_TopRow(UBuilder builder) {
r.Control.isVisible = true; // not sure why its hidden on create? TODO
r.Stack(
mode: UStackMode.ToTheRight,
spacing: UConst.UIPADDING * 3f,
spacing: toolPanel.size.x + rightPanel.size.x - versionLabel.size.x - 9f,
stackRef: versionLabel);
});

Expand Down Expand Up @@ -395,7 +397,8 @@ public override void OnBeforeResizerUpdate() {
/// <summary>Called by UResizer for every control to be 'resized'.</summary>
public override void OnAfterResizerUpdate() {
if (this.DragHandle != null) {
this.DragHandle.size = this.VersionLabel.size;
this.DragHandle.size = new Vector2(toolPanel.size.x + rightPanel.size.x - 9f,
VersionLabel.size.y);

// Push the window back into screen if the label/draghandle are partially offscreen
U.UIUtil.ClampToScreen(
Expand Down