N3OW/N3OW/gui/map_icon_layer_templates.gui
2025-10-30 11:25:16 +00:00

1013 lines
22 KiB
Text

### COMBAT PREDICTION
template combat_prediction_tooltip
{
flowcontainer = {
direction = vertical
alwaystransparent = no
using = Background_Tooltip
widget = {
name = "top"
size = { 600 100 }
textbox = {
using = DefaultTooltipText
name = "Header"
position = { 0 10 }
autoresize = yes
fonttintcolor = "[TooltipInfo.GetTintColor]"
text = "[CombatPredictionMapIcon.GetHeader]"
snap_to_pixels = no
parentanchor = top|hcenter
}
coa_realm_medium = {
name = "LeftRealm"
position = { 15 15 }
datacontext = "[CombatPredictionMapIcon.GetPlayerSideCharacter]"
tintcolor = "[TooltipInfo.GetTintColor]"
}
coa_realm_medium = {
name = "RightRealm"
position = { -15 15 }
parentanchor = right
datacontext = "[CombatPredictionMapIcon.GetEnemySideCharacter]"
tintcolor = "[TooltipInfo.GetTintColor]"
}
### prediction
container = {
name = "PredictionContainer"
position = { 0 40 }
parentanchor = top|hcenter
icon = {
name = "PredictionIcon"
texture = "gfx/interface/icons/map_icons/combat_prediction_icon.dds"
size = { 50 50 }
framesize = { 120 120 }
frame = "[CombatPredictionMapIcon.GetPredictionLevelFrame]"
tintcolor = "[TooltipInfo.GetTintColor]"
}
text_single = {
name = "PredictionText"
position = { 55 10 }
margin_right = 10
fonttintcolor = "[TooltipInfo.GetTintColor]"
text = "[CombatPredictionMapIcon.GetPredictionText]"
snap_to_pixels = no
}
}
}
container = {
name = "list"
### left edges
flowcontainer = {
position = { 20 0 }
dynamicgridbox = {
name = "LeftCombatEdges"
datamodel = "[CombatPredictionMapIcon.GetPlayerSideEdges]"
item = {
container = {
datacontext = "[GetDeepestTooltipInfo]" # as tooltip info doesn't propagate into grid box items
background = {
name = "bg"
using = Background_Area
}
icon = {
name = "edge_icon"
texture = "[CombatPredictionEdge.GetIcon]"
size = { 32 32 }
position = { 7 0 }
parentanchor = vcenter
tintcolor = "[TooltipInfo.GetTintColor]"
}
text_multi = {
position = { 40 0 }
name = "PredictionText"
max_width = 230
autoresize = yes
margin = { 5 2 }
margin_bottom = 8
fonttintcolor = "[TooltipInfo.GetTintColor]"
text = "[CombatPredictionEdge.GetLabel|P]"
snap_to_pixels = no
}
}
}
}
}
### right edges
flowcontainer = {
position = { 310 0 }
dynamicgridbox = {
name = "RightCombatEdges"
datamodel = "[CombatPredictionMapIcon.GetEnemySideEdges]"
item = {
flowcontainer = {
datacontext = "[GetDeepestTooltipInfo]" # as tooltip info doesn't propagate into grid box items
margin = { 10 5 }
spacing = 10
background = {
name = "bg"
using = Background_Area
}
icon = {
name = "edge_icon"
texture = "[CombatPredictionEdge.GetIcon]"
size = { 32 32 }
parentanchor = vcenter
tintcolor = "[TooltipInfo.GetTintColor]"
}
text_multi = {
name = "PredictionText"
max_width = 230
min_width = 230
autoresize = yes
parentanchor = vcenter
fonttintcolor = "[TooltipInfo.GetTintColor]"
text = "[CombatPredictionEdge.GetLabel|N]"
}
}
}
}
}
}
widget = {
size = { 0 15 }
}
}
}
types MapIcons {
type icon_unit_quality = icon {
name = "unit_quality"
texture = "gfx/interface/icons/army_quality_icon.dds"
framesize = { 32 32 }
size = { 22 22 }
frame = "[UnitItem.GetQualityLevel]"
}
type container_supply_icon = widget {
size = { 35 30 }
name = "supplies"
visible = "[UnitItem.ShowSupplyIcon]"
icon = {
name = "bg"
position = { 0 0 }
size = { 30 30 }
texture = "gfx/interface/icons/icon_bg_small.dds"
}
icon = {
name = "supply_icon"
position = { 2 2 }
framesize = { 30 30 }
size = { 25 25 }
frame = "[UnitItem.GetSupplyStateFrame]"
texture = "gfx/interface/icons/icon_supplies_small.dds"
}
icon = {
name = "supply_trend_icon"
visible = "[UnitItem.ShowSupplyTrend]"
position = { 17 10 }
size = { 20 20 }
texture = "gfx/interface/icons/symbols/icon_supplies_trend.dds"
}
}
type icon_raider = icon {
name = "raider"
visible = "[Army.IsRaidArmy]"
size = { 30 30 }
texture = "gfx/interface/icons/map_coa/icon_raider.dds"
tooltip = "RAID_ARMY_TOOLTIP"
}
type icon_barterer = icon {
name = "barterer"
visible = "[Army.IsBarterArmy]"
size = { 30 30 }
texture = "gfx/interface/icons/map_coa/icon_barterer.dds"
tooltip = "BARTER_ARMY_TOOLTIP"
}
type icon_ai_order = icon {
name = "ai_order"
visible = "[And(Army.ShowUnitAIOrderIcon, Or(Army.IsControlledByCompanionAI, UnitItem.IsUnitItemAlly))]"
size = { 22 22 }
texture = "[Army.GetUnitAIOrderIcon]"
}
# UNITS
type widget_unit_icon_item = widget {
size = { 114 35 }
datacontext = "[UnitMapIcon.GetDisplayedUnitItem]"
allow_outside = yes
alwaystransparent = no
tooltipwidget = {
using = unit_icon_tooltip
}
using = tooltip_se
flowcontainer = {
position = { -10 0 }
allow_outside = yes
ignoreinvisible = yes
container_allied_unit_icon_item = {}
container_hostile_unit_icon_item = {}
}
}
type container_allied_unit_icon_item = flowcontainer {
name = "allied_unit_icon_item"
datacontext = "[UnitItem.GetArmy]"
visible = "[Not(Or(UnitItem.IsUnitItemEnemy, UnitItem.IsUnitItemHostile))]"
ignoreinvisible = yes
state = {
name = _mouse_hierarchy_enter
on_start = "[Army.OnMouseEnter]"
}
state = {
name = _mouse_hierarchy_leave
on_start = "[Army.OnMouseLeave]"
}
block "siege_window"
{
container_supply_icon = {}
spacer = {
visible = "[Or(Army.IsControlledByCompanionAI, UnitItem.IsUnitItemAlly)]"
size = { 26 0 }
}
}
container = {
block "siege_window"
{
container_unit_effect_icons = {
position = { 30 26 }
}
}
button_group = {
block "onclick" {
onclick = "[UnitMapIcon.OnClickArmyGroup( Army.Self )]"
}
button_group = {
position = { 36 0 }
background = {
name = "unit_bg_me"
visible = "[UnitItem.IsUnitItemMine]"
texture = "gfx/interface/icons/map_icons/army_bg_me.dds"
framesize = { 164 54 }
frame = "[UnitItem.GetQualityLevel]"
margin_left = 24
margin_right = 15
margin_bottom = 5
}
background = {
name = "unit_bg_ally"
visible = "[UnitItem.IsUnitItemAlly]"
texture = "gfx/interface/icons/map_icons/army_bg_ally.dds"
framesize = { 164 54 }
frame = "[UnitItem.GetQualityLevel]"
margin_left = 24
margin_right = 15
margin_bottom = 5
}
background = {
name = "unit_bg_neutral"
visible = "[UnitItem.IsUnitItemNeutral]"
texture = "gfx/interface/icons/map_icons/army_bg_neutral.dds"
framesize = { 164 54 }
frame = "[UnitItem.GetQualityLevel]"
margin_left = 24
margin_right = 15
margin_bottom = 5
}
background = {
name = "unit_highlight"
visible = "[Or( UnitItem.ShouldBeHighlighted, UnitItem.IsSelected )]"
texture = "gfx/interface/icons/map_icons/army_selected.dds"
margin_left = 24
margin_right = 15
margin_bottom = 5
}
##### GATHERING VERSIONS ####
background = {
visible = "[And(UnitItem.IsGathering, UnitItem.IsUnitItemMine)]"
using = Unit_Bg_Gathering
}
background = {
visible = "[And(UnitItem.IsGathering, UnitItem.IsUnitItemAlly)]"
using = Unit_Bg_Gathering
}
background = {
visible = "[And(UnitItem.IsGathering, UnitItem.IsUnitItemNeutral)]"
using = Unit_Bg_Gathering
}
flowcontainer = {
spacing = 3
ignoreinvisible = yes
block "unit_items" {
text_single = {
visible = "[GreaterThanOrEqualTo_int32(UnitMapIcon.GetShownCount, '(int32)2')]"
text = "UNIT_ITEMS"
default_format = "#medium;bold;glow_color:{0.1,0.1,0.1,1.0}"
margin_top = 2
snap_to_pixels = no
}
}
text_single = {
name = "soldiers"
text = "[UnitItem.GetCombatStrength]"
default_format = "#high;glow_color:{0.1,0.1,0.1,1.0}"
using = Font_Size_Medium
margin_bottom = 2
snap_to_pixels = no
}
block "multi_select" {
text_single = {
visible = "[Not( EqualTo_int32(UnitMapIcon.GetShownCount, GetDataModelSize(UnitMapIcon.GetUnitItems)) )]"
raw_text = "+"
default_format = "#medium;bold;glow_color:{0.1,0.1,0.1,1.0}"
margin_top = 2
snap_to_pixels = no
}
}
widget = {
size = { 22 22 }
icon_unit_quality = {
parentanchor = vcenter
position = { 0 5 }
}
}
}
}
block "siege_window"
{
button_group = {
name = "rally_point"
size = { 34 34 }
army_automation_on_big = {
size = { 36 36 }
position = { -28 -2 }
}
icon_ai_order = {
size = { 24 24 }
position = { -22 4 }
}
icon_ai_order = {
visible = "[UnitItem.IsUnitItemAlly]"
size = { 28 28 }
position = { -26 0 }
}
icon_raider = {
position = { 0 -22 }
}
icon_barterer = {
position = { 0 -22 }
}
coa_realm_tiny = {
position = { 0 3 }
visible = "[And(Not(UnitItem.IsOnlyHiredTroops), UnitItem.IsUnitItemMine)]"
datacontext = "[UnitItem.GetOwner]"
tooltip_visible = no
}
button = {
name = "hired_troops"
visible = "[And(UnitItem.IsOnlyHiredTroops, UnitItem.IsUnitItemMine)]"
texture = "gfx/interface/icons/map_icons/county_hired_troops.dds"
position = { 6 0 }
size = { 30 30 }
}
}
}
}
block "siege_window"
{
widget = {
size = { 32 32 }
icon = {
name = "ally_war_icon"
visible = "[UnitItem.IsUnitItemAlly]"
parentanchor = center
position = { 0 -17 }
texture = "gfx/interface/icons/diplomatic_icons.dds"
frame = 2
framesize = { 120 120 }
size = { 30 30 }
}
coa_realm_tiny = {
datacontext = "[UnitItem.GetOwner]"
visible = "[Not(UnitItem.IsUnitItemMine)]"
position = { 0 2 }
tooltip_visible = no
}
}
}
}
}
type container_hostile_unit_icon_item = container {
datacontext = "[UnitItem.GetArmy]"
allow_outside = yes
ignoreinvisible = yes
visible = "[Or(UnitItem.IsUnitItemEnemy, UnitItem.IsUnitItemHostile)]"
block "siege_window"
{
container_supply_icon = {
position = { 0 1 }
}
container_unit_effect_icons = {
position = { 5 25 }
}
}
flowcontainer = {
ignoreinvisible = yes
allow_outside = yes
flowcontainer = {
spacing = 3
ignoreinvisible = yes
background = {
name = "unit_bg_enemy"
visible = "[Not(UnitItem.IsUnitItemHostile)]"
texture = "gfx/interface/icons/map_icons/army_bg_enemy.dds"
mirror = horizontal
framesize = { 164 54 }
frame = "[UnitItem.GetQualityLevel]"
margin_left = 10
margin_right = 20
margin_bottom = 5
}
background = {
name = "unit_bg_hostile"
visible = "[UnitItem.IsUnitItemHostile]"
texture = "gfx/interface/icons/map_icons/army_bg_hostile.dds"
mirror = horizontal
framesize = { 164 54 }
frame = "[UnitItem.GetQualityLevel]"
margin_left = 10
margin_right = 20
margin_bottom = 5
}
######### GATHERING VERSIONS ########
background = {
visible = "[And(UnitItem.IsGathering, Not(UnitItem.IsUnitItemHostile))]"
using = Unit_Bg_Gathering
}
background = {
visible = "[And(UnitItem.IsGathering, UnitItem.IsUnitItemHostile)]"
using = Unit_Bg_Gathering
}
widget = {
size = { 22 22 }
icon_unit_quality = {
parentanchor = vcenter
position = { 0 4 }
}
}
block "unit_items" {
text_single = {
visible = "[GreaterThanOrEqualTo_int32(GetDataModelSize(UnitMapIcon.GetUnitItems), '(int32)2')]"
text = "UNIT_ITEMS"
default_format = "#medium;bold;glow_color:{0.1,0.1,0.1,1.0}"
margin_top = 2
snap_to_pixels = no
}
}
text_single = {
name = "soldiers"
text = "[UnitItem.GetCombatStrength]"
default_format = "#high;glow_color:{0.1,0.1,0.1,1.0}"
using = Font_Size_Medium
snap_to_pixels = no
margin_bottom = 1
}
}
block "siege_window"
{
widget = {
allow_outside = yes
size = { 32 32 }
icon_raider = {
position = { 2 -22 }
}
icon = {
name = "at_war_icon"
visible = "[Not(UnitItem.IsUnitItemHostile)]"
texture = "gfx/interface/icons/map_coa/icon_at_war.dds"
size = { 45 18 }
parentanchor = top|hcenter
position = { 5 -12 }
}
coa_realm_tiny = {
position = { 5 2 }
datacontext = "[UnitItem.GetOwner]"
allow_outside = yes
}
}
container_supply_icon = {}
}
}
}
type container_unit_effect_icons = flowcontainer {
name = "icon_container"
ignoreinvisible = yes
icon = {
name = "commander_is_owner"
texture = "gfx/interface/icons/map_icons/commander_is_leader.dds"
visible = "[UnitItem.IsRulerCommander]"
}
icon = {
name = "unit_retreating"
visible = "[UnitItem.IsRetreating]"
texture = "gfx/interface/icons/map_icons/army_icon_retreating.dds"
}
icon = {
name = "unit_gathering"
visible = "[UnitItem.ShouldShowGatheringProgress]"
texture = "gfx/interface/icons/map_icons/army_icon_gathering.dds"
}
icon = {
name = "unit_attrition"
visible = "[GreaterThan_CFixedPoint( Army.GetArmyAttritionPercentage, '(CFixedPoint)0' )]"
texture = "gfx/interface/icons/map_icons/army_icon_attrition.dds"
size = { 23 23 }
}
icon = {
name = "sea_sickness_icon"
visible = "[UnitItem.HasDisembarkPenalty]"
size = { 23 23 }
texture = "gfx/interface/icons/map_icons/army_icon_disembarked.dds"
}
icon = {
name = "at_loot_cap"
visible = "[Army.IsLootCapped]"
size = { 23 23 }
texture = "gfx/interface/icons/map_icons/army_icon_at_loot_cap.dds"
}
flowcontainer = {
margin_top = 7
margin_left = -2
progressbar_standard = {
name = "gathering_progress"
visible = "[UnitItem.ShouldShowGatheringProgress]"
size = { 30 8 }
min = 0
max = 1
value = "[Army.GetGatheringProgress]"
using = Animation_ShowHide_Standard
}
}
}
}
template siege_goto_template
{
button_group = {
onclick = "[DefaultOnSiegeClick(Siege.GetID)]"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_select"
filter_mouse = left
block "tooltip"
{
tooltip = "[Siege.GetSiegeDescription]"
}
highlight_icon = {
parentanchor = vcenter
widgetanchor = vcenter
size = { 40 40 }
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/onmap_siege_icon.dds"
}
}
}
template raid_goto_template
{
button_group = {
onclick = "[DefaultOnRaidClick( Raid.Self )]"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_select"
filter_mouse = left
block "tooltip"
{
tooltip = "MAP_RAID_TOOLTIP"
}
highlight_icon = {
parentanchor = vcenter
widgetanchor = vcenter
size = { 40 40 }
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/onmap_raid_icon.dds"
}
}
}
template barter_goto_template
{
button_group = {
onclick = "[DefaultOnBarterClick( BarterMission.Self )]"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_select"
filter_mouse = left
block "tooltip"
{
tooltip = "MAP_BARTER_TOOLTIP"
}
highlight_icon = {
parentanchor = vcenter
widgetanchor = vcenter
size = { 40 40 }
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/onmap_barter_icon.dds"
}
}
}
template State_Title_MouseEntry
{
state = {
name = _mouse_enter
on_start = "[Title.OnMouseEnter]"
}
state = {
name = _mouse_leave
on_start = "[Title.OnMouseLeave]"
}
}
template State_Realm_MouseEntry
{
state = {
name = _mouse_enter
on_start = "[Character.OnMouseEnter]"
}
state = {
name = _mouse_leave
on_start = "[Character.OnMouseLeave]"
}
}
template Holding_Mouse_Entry
{
state = {
name = _mouse_enter
on_start = "[Holding.OnMouseEnter]"
}
state = {
name = _mouse_leave
on_start = "[Holding.OnMouseLeave]"
}
}
template Epidemic_Mouse_Entry
{
state = {
name = _mouse_enter
on_start = "[Epidemic.OnMouseEnter]"
}
state = {
name = _mouse_leave
on_start = "[Epidemic.OnMouseLeave]"
}
}
template Legend_Mouse_Entry
{
state = {
name = _mouse_enter
on_start = "[Legend.OnMouseEnter]"
}
state = {
name = _mouse_leave
on_start = "[Legend.OnMouseLeave]"
}
}
template Confederation_Mouse_Entry
{
state = {
name = _mouse_enter
on_start = "[Confederation.OnMouseEnter]"
}
state = {
name = _mouse_leave
on_start = "[Confederation.OnMouseLeave]"
}
}
template Domain_Info_Icons
{
icon_button_small_round = {
position = { 0 0 }
size = { 30 30 }
datacontext = "[GetPlayer]"
tooltip = "HOLDING_VIEW_WRONG_HOLDING_TYPE"
}
icon_button_small_round = {
position = { 30 0 }
size = { 30 30 }
tooltip = "MY_REALM_WINDOW_MAP_ICON_LOW_CONTROL"
}
icon = {
position = { 60 0 }
size = { 30 30 }
texture = "gfx/interface/icons/map_icons/county_building_available.dds"
tooltip = "MY_REALM_WINDOW_CONSTRUCT_BUILDING"
}
}
template Unit_Bg_Gathering
{
texture = "gfx/interface/icons/map_icons/army_bg_neutral.dds"
alpha = 0.6
framesize = { 164 54 }
frame = "[UnitItem.GetQualityLevel]"
modify_texture = {
texture = "gfx/interface/icons/map_icons/army_overlay_gathering.dds"
blend_mode = multiply
# alpha = 0.5
}
margin_left = 10
margin_right = 15
margin_top = -2
margin_bottom = 5
}
types MapIconTempateTypes {
type button_group_siege = button_group {
onclick = "[DefaultOnSiegeClick(Siege.GetID)]"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_select"
filter_mouse = left
tooltip = "[Siege.GetSiegeDescription]"
flowcontainer = {
ignoreinvisible = yes
container = {
parentanchor = vcenter
highlight_icon = {
parentanchor = vcenter
size = { 40 40 }
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/onmap_siege_icon.dds"
}
highlight_icon = {
visible = "[Siege.EnableAssaultButton]"
parentanchor = vcenter
position = { 16 2 }
size = { 23 39 }
name = "assault_icon"
texture = "gfx/interface/icons/map_icons/assault_icon.dds"
}
}
container = {
parentanchor = vcenter
progressbar_standard = {
position = { -3 4 }
size = { 36 13 }
value = [Siege.GetProgress]
}
highlight_icon = {
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/siege_blocked_map_icon.dds"
position = { -2 5 }
visible = "[Siege.IsBlocked]"
}
}
container = {
parentanchor = vcenter
visible = "[Siege.FortLevelHasImpact]"
highlight_icon = {
name = "holding_level_high"
block "overlay_size"
{
size = { 30 30 }
}
alwaystransparent = yes
texture = "gfx/interface/icons/icon_holding_castle.dds"
glow = {
using = Color_Red
using = Glow_Standard
glow_radius = 4
}
using = Animation_Glow_Pulse
}
highlight_icon = {
name = "fort_level_bad"
widgetanchor = bottom|right
parentanchor = bottom|right
block "overlay_size"
{
size = { 20 20 }
}
alwaystransparent = yes
texture = "gfx/interface/icons/symbols/icon_warning.dds"
}
}
}
}
type button_group_raid = button_group {
onclick = "[DefaultOnRaidClick( Raid.Self )]"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_select"
filter_mouse = left
tooltip = "MAP_RAID_TOOLTIP"
flowcontainer = {
ignoreinvisible = yes
container = {
parentanchor = vcenter
widgetanchor = vcenter
highlight_icon = {
parentanchor = vcenter
widgetanchor = vcenter
size = { 40 40 }
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/onmap_raid_icon.dds"
}
}
container = {
parentanchor = vcenter
widgetanchor = vcenter
progressbar_standard = {
position = { -3 4 }
size = { 36 13 }
value = "[Raid.GetProgressPercent]"
}
highlight_icon = {
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/raid_blocked_map_icon.dds"
position = { -2 5 }
visible = "[Raid.IsBlocked]"
}
}
}
}
type button_group_barter = button_group {
onclick = "[DefaultOnBarterClick( BarterMission.Self )]"
oversound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
clicksound = "event:/SFX/UI/Generic/sfx_ui_generic_icon_select"
filter_mouse = left
tooltip = "MAP_BARTER_TOOLTIP"
flowcontainer = {
ignoreinvisible = yes
container = {
parentanchor = vcenter
widgetanchor = vcenter
highlight_icon = {
parentanchor = vcenter
widgetanchor = vcenter
size = { 40 40 }
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/onmap_barter_icon.dds"
}
}
container = {
parentanchor = vcenter
widgetanchor = vcenter
progressbar_standard = {
position = { -3 4 }
size = { 36 13 }
value = "[BarterMission.GetProgressPercent]"
}
highlight_icon = {
name = "blocked_icon"
texture = "gfx/interface/icons/map_icons/barter_blocked_map_icon.dds"
position = { -2 5 }
visible = "[BarterMission.IsBlocked]"
}
}
}
}
}