Skip to content

Commit

Permalink
Colorize trigger parameters of trigger actions based on trigger color
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Sep 4, 2024
1 parent 5a50519 commit fc25b26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/TSMapEditor/UI/Windows/TriggersWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,12 @@ private Color GetParamValueColor(string paramValue, TriggerParamType paramType)
return Helpers.GetHouseTypeUITextColor(teamType.HouseType);
}
goto case TriggerParamType.Unused;
case TriggerParamType.Trigger:
Trigger trigger = map.Triggers.Find(t => t.ID == paramValue);
if (trigger == null || trigger.EditorColor == null)
goto case TriggerParamType.Unused;

return trigger.XNAColor;
case TriggerParamType.Unused:
default:
return UISettings.ActiveSettings.AltColor;
Expand Down

0 comments on commit fc25b26

Please sign in to comment.