Make ActorSelector tooltips better match actor tooltips in map editor
This commit is contained in:
@@ -137,7 +137,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
item.IsVisible = () => true;
|
item.IsVisible = () => true;
|
||||||
|
|
||||||
var tooltip = actor.TraitInfoOrDefault<TooltipInfo>();
|
var tooltip = actor.TraitInfoOrDefault<TooltipInfo>();
|
||||||
item.GetTooltipText = () => tooltip == null ? actor.Name : tooltip.Name + " (" + actor.Name + ")";
|
item.GetTooltipText = () => (tooltip == null ? "\nType: " : tooltip.Name + "\nType: ") + actor.Name;
|
||||||
|
|
||||||
panel.AddChild(item);
|
panel.AddChild(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,6 +329,7 @@ Container@EDITOR_WORLD_ROOT:
|
|||||||
Visible: false
|
Visible: false
|
||||||
Width: PARENT_RIGHT - 35
|
Width: PARENT_RIGHT - 35
|
||||||
TooltipContainer: TOOLTIP_CONTAINER
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
|
TooltipTemplate: TWO_LINE_TOOLTIP
|
||||||
IgnoreChildMouseOver: true
|
IgnoreChildMouseOver: true
|
||||||
Children:
|
Children:
|
||||||
ActorPreview@ACTOR_PREVIEW:
|
ActorPreview@ACTOR_PREVIEW:
|
||||||
|
|||||||
@@ -8,6 +8,21 @@ Background@SIMPLE_TOOLTIP:
|
|||||||
Height: 23
|
Height: 23
|
||||||
Font: Bold
|
Font: Bold
|
||||||
|
|
||||||
|
Background@TWO_LINE_TOOLTIP:
|
||||||
|
Logic: ButtonTooltipLogic
|
||||||
|
Background: panel-black
|
||||||
|
Height: 48
|
||||||
|
Children:
|
||||||
|
Label@LABEL:
|
||||||
|
X: 5
|
||||||
|
Height: 46
|
||||||
|
Font: Bold
|
||||||
|
Label@HOTKEY:
|
||||||
|
Visible: false
|
||||||
|
TextColor: FFFF00
|
||||||
|
Height: 23
|
||||||
|
Font: Bold
|
||||||
|
|
||||||
Background@BUTTON_TOOLTIP:
|
Background@BUTTON_TOOLTIP:
|
||||||
Logic: ButtonTooltipLogic
|
Logic: ButtonTooltipLogic
|
||||||
Background: panel-black
|
Background: panel-black
|
||||||
|
|||||||
@@ -9,6 +9,23 @@ Background@SIMPLE_TOOLTIP:
|
|||||||
Height: 23
|
Height: 23
|
||||||
Font: Bold
|
Font: Bold
|
||||||
|
|
||||||
|
Background@TWO_LINE_TOOLTIP:
|
||||||
|
Logic: ButtonTooltipLogic
|
||||||
|
Background: dialog3
|
||||||
|
Height: 54
|
||||||
|
Children:
|
||||||
|
Label@LABEL:
|
||||||
|
X: 5
|
||||||
|
Y: 3
|
||||||
|
Height: 46
|
||||||
|
Font: Bold
|
||||||
|
Label@HOTKEY:
|
||||||
|
Visible: false
|
||||||
|
Y: 3
|
||||||
|
Height: 23
|
||||||
|
TextColor: FFFF00
|
||||||
|
Font: Bold
|
||||||
|
|
||||||
Background@BUTTON_TOOLTIP:
|
Background@BUTTON_TOOLTIP:
|
||||||
Logic: ButtonTooltipLogic
|
Logic: ButtonTooltipLogic
|
||||||
Background: dialog3
|
Background: dialog3
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ Container@EDITOR_WORLD_ROOT:
|
|||||||
Visible: false
|
Visible: false
|
||||||
Width: PARENT_RIGHT - 35
|
Width: PARENT_RIGHT - 35
|
||||||
TooltipContainer: TOOLTIP_CONTAINER
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
|
TooltipTemplate: TWO_LINE_TOOLTIP
|
||||||
IgnoreChildMouseOver: true
|
IgnoreChildMouseOver: true
|
||||||
Children:
|
Children:
|
||||||
ActorPreview@ACTOR_PREVIEW:
|
ActorPreview@ACTOR_PREVIEW:
|
||||||
|
|||||||
@@ -9,6 +9,23 @@ Background@SIMPLE_TOOLTIP:
|
|||||||
Height: 23
|
Height: 23
|
||||||
Font: Bold
|
Font: Bold
|
||||||
|
|
||||||
|
Background@TWO_LINE_TOOLTIP:
|
||||||
|
Logic: ButtonTooltipLogic
|
||||||
|
Background: dialog4
|
||||||
|
Height: 52
|
||||||
|
Children:
|
||||||
|
Label@LABEL:
|
||||||
|
X: 7
|
||||||
|
Y: 2
|
||||||
|
Height: 46
|
||||||
|
Font: Bold
|
||||||
|
Label@HOTKEY:
|
||||||
|
Visible: false
|
||||||
|
Y: 2
|
||||||
|
Height: 23
|
||||||
|
TextColor: FFFF00
|
||||||
|
Font: Bold
|
||||||
|
|
||||||
Background@BUTTON_TOOLTIP:
|
Background@BUTTON_TOOLTIP:
|
||||||
Logic: ButtonTooltipLogic
|
Logic: ButtonTooltipLogic
|
||||||
Background: dialog4
|
Background: dialog4
|
||||||
|
|||||||
Reference in New Issue
Block a user