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

698 lines
17 KiB
Text

window = {
name = "letter_event"
gfxtype = windowgfx
parentanchor = center
layer = events
allow_outside = yes
size = { 675 530 } ############ SIZES NEED TO MATCH
using = Window_Movable
datacontext = "[EventWindow.AccessEventWindowData]"
state = {
name = _show
trigger_on_create = yes
on_start = "[GetVariableSystem.Clear( 'event_window_mouse_leave')]"
on_start = "[PdxGuiWidget.AccessChild('letter_paper').TriggerAnimation('show')]"
on_start = "[PdxGuiWidget.AccessChild('letter_content').TriggerAnimation('show')]"
start_sound = {
soundeffect = "event:/SFX/Events/Panels/sfx_event_panel_letter"
}
}
state = {
name = _hide
duration = 1
on_start = "[PdxGuiWidget.AccessChild('letter_paper').TriggerAnimation('hide')]"
on_start = "[PdxGuiWidget.AccessChild('letter_content').TriggerAnimation('hide')]"
}
state = {
name = _mouse_hierarchy_leave
on_start = "[GetVariableSystem.Set( 'event_window_mouse_leave', 'true' )]"
}
### PAPER ###
widget = {
name = "letter_paper"
size = { 675 45 }
widgetanchor = center
parentanchor = center
alpha = 0
using = Background_Letter
state = {
name = show
next = a
delay = 0.3
using = Animation_FadeIn_Standard
animation = {
alpha = 1
bezier = { 0.7 0 0.7 1 }
}
}
state = {
name = a
duration = 0.25
bezier = { 0.3 0 0.7 1 }
animation = {
size = { 675 530 } ############ SIZES NEED TO MATCH
bezier = { 0.8 0.3 0 1 }
}
animation = {
alpha = 1
bezier = { 0.7 0 0.7 1 }
}
}
state = {
name = hide
using = Animation_FadeOut_Quick
size = { 585 -1 }
}
widget = {
size = { 700 40 }
widgetanchor = center
parentanchor = top|hcenter
position = { 0 8 }
background = {
texture = "gfx/interface/skinned/window_letter/letter_event_edge_top.dds"
spriteType = Corneredstretched
spriteborder = { 35 5 }
}
}
widget = {
size = { 700 40 }
widgetanchor = center
parentanchor = bottom|hcenter
position = { 0 -8 }
background = {
texture = "gfx/interface/skinned/window_letter/letter_event_edge_bottom.dds"
spriteType = Corneredstretched
spriteborder = { 35 5 }
}
}
}
### CONTENT ###
widget = {
name = "letter_content"
widgetanchor = center
parentanchor = center
size = { 675 530 } ############ SIZES NEED TO MATCH
alpha = 0
state = {
name = show
delay = 0.8
using = Animation_FadeIn_Standard
animation = {
size = { 675 530 } ############ SIZES NEED TO MATCH
bezier = { 0.8 0.3 0 1 }
}
animation = {
alpha = 1
bezier = { 0.7 0 0.7 1 }
}
}
state = {
name = hide
using = Animation_FadeOut_Quick
duration = 0.08
}
flowcontainer = {
name = "debug_stuff"
visible = "[InDebugMode]"
parentanchor = top|hcenter
position = { 25 20 }
ignoreinvisible = yes
using = Event_Window_Debug_Info
}
icon = {
size = { 256 432 }
position = { 0 24 }
alpha = 0.8
texture = "gfx/interface/window_legend_chronicle/marginalia_portrait_gold_bg.dds"
modify_texture = {
texture = "gfx/interface/component_masks/mask_portrait.dds"
blend_mode = alphamultiply
}
}
widget = {
size = { 328 548 }
position = { 10 15 }
alpha = 0.8
scale = 0.8
background = {
texture = "gfx/interface/skinned/window_letter/letter_event_pattern_big.dds"
}
}
widget = {
parentanchor = bottom|right
size = { 264 264 }
position = { -10 -20 }
scale = 0.6
alpha = 0.8
background = {
texture = "gfx/interface/skinned/window_letter/letter_event_pattern_small.dds"
}
}
widget = {
parentanchor = top|right
size = { 264 264 }
position = { -10 15 }
scale = 0.6
alpha = 0.8
background = {
texture = "gfx/interface/skinned/window_letter/letter_event_pattern_small.dds"
mirror = vertical
}
}
widget = {
parentanchor = bottom|left
size = { 264 264 }
position = { 10 -20 }
scale = 0.6
alpha = 0.8
background = {
texture = "gfx/interface/skinned/window_letter/letter_event_pattern_small.dds"
mirror = horizontal
}
}
vbox = {
margin = { 10 25 }
margin_right = 0
margin_bottom = 40
expand = {}
hbox = {
name = "content"
layoutpolicy_horizontal = expanding
vbox = {
layoutpolicy_vertical = expanding
minimumsize = { 180 0 }
allow_outside = yes
widget = {
size = { 180 300 }
allow_outside = yes
portrait_body = {
name = "portrait"
parentanchor = center
datacontext = "[EventWindowData.GetPortraitCharacter('sender')]"
blockoverride "portrait_button" {
alwaystransparent = "[Not(EventWindowData.ShouldShowPortraitInfo('sender'))]"
tooltip_visible = "[EventWindowData.ShouldShowPortraitInfo('sender')]"
}
blockoverride "mask" {
mask = "gfx/portraits/portrait_mask_event_letter.dds"
}
blockoverride "prison" {}
blockoverride "grayscale" {}
blockoverride "status_icons" {}
blockoverride "opinon_box" {}
blockoverride "coa" {}
}
}
}
### text
vbox = {
name = "text"
layoutpolicy_vertical = expanding
text_multi = {
name = "opening"
visible = "[EventWindowData.HasOpening]"
layoutpolicy_horizontal = expanding
maximumsize = { 430 -1 }
autoresize = yes
margin_top = 10
margin_right = 20
text = "[EventWindowData.GetOpening]"
default_format = "#light_background"
using = Font_Type_Flavor
using = Font_Size_Big
format_override = { high light_background }
}
#### 1 option ####
scrollarea = {
visible = "[LessThanOrEqualTo_int32( GetDataModelSize(EventWindowData.GetOptions), '(int32)1')]"
maximumsize = { -1 280 }
minimumsize = { 430 0 }
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
autoresizescrollarea = yes
scrollbarpolicy_horizontal = always_off
scrollbar_vertical = {
using = Scrollbar_Vertical
}
scrollwidget = {
text_multi = {
name = "description"
maximumsize = { 430 -1 }
autoresize = yes
margin = { 0 10 }
margin_right = 20
alwaystransparent = yes
text = "[EventWindowData.GetDescription]"
default_format = "#light_background"
using = Font_Size_Medium
format_override = { high light_background }
}
}
}
#### 2 options ####
scrollarea = {
visible = "[EqualTo_int32( GetDataModelSize(EventWindowData.GetOptions), '(int32)2')]"
maximumsize = { -1 240 }
minimumsize = { 430 0 }
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
autoresizescrollarea = yes
scrollbarpolicy_horizontal = always_off
scrollbar_vertical = {
using = Scrollbar_Vertical
}
scrollwidget = {
text_multi = {
name = "description"
maximumsize = { 430 -1 }
autoresize = yes
margin = { 0 10 }
margin_right = 20
alwaystransparent = yes
text = "[EventWindowData.GetDescription]"
default_format = "#light_background"
using = Font_Size_Medium
format_override = { high light_background }
}
}
}
#### 3 options ####
scrollarea = {
visible = "[EqualTo_int32( GetDataModelSize(EventWindowData.GetOptions), '(int32)3')]"
maximumsize = { -1 190 }
minimumsize = { 430 0 }
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
autoresizescrollarea = yes
scrollbarpolicy_horizontal = always_off
scrollbar_vertical = {
using = Scrollbar_Vertical
}
scrollwidget = {
text_multi = {
name = "description"
maximumsize = { 430 -1 }
autoresize = yes
margin = { 0 10 }
margin_right = 20
alwaystransparent = yes
text = "[EventWindowData.GetDescription]"
default_format = "#light_background"
using = Font_Size_Medium
format_override = { high light_background }
}
}
}
#### 4 options ####
scrollarea = {
visible = "[GreaterThanOrEqualTo_int32( GetDataModelSize(EventWindowData.GetOptions), '(int32)4')]"
minimumsize = { 430 0 }
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
scrollbarpolicy_horizontal = always_off
scrollbar_vertical = {
using = Scrollbar_Vertical
}
scrollwidget = {
text_multi = {
name = "description"
maximumsize = { 430 -1 }
autoresize = yes
margin = { 0 10 }
margin_right = 20
alwaystransparent = yes
text = "[EventWindowData.GetDescription]"
default_format = "#light_background"
using = Font_Size_Medium
format_override = { high light_background }
}
}
}
hbox = {
name = "signed_text"
layoutpolicy_horizontal = expanding
spacing = 10
margin_right = 15
expand = {}
vbox = {
text_single = {
name = "signed_text"
align = right
layoutpolicy_horizontal = expanding
text = "[EventWindowData.GetSigned]"
default_format = "#light_background"
using = Font_Size_Medium
}
text_multi = {
name = "signature"
align = left
text = "[EventWindowData.GetSignature]"
default_format = "#light_background"
using = Font_Type_Flavor
using = Font_Size_Medium
format_override = { high light_background }
autoresize = yes
max_width = 350
fontsize_min = 14
using = Text_Light_Background_Overrides
}
}
coa_character_sigil = {
datacontext = "[EventWindowData.GetPortraitCharacter('sender')]"
visible = "[And( EventWindowData.ShouldShowPortraitInfo('sender'), EventWindowData.GetPortraitCharacter('sender').GetDynasty.IsValid )]"
blockoverride "size"
{
size = { 80 80 }
}
blockoverride "sigil_size"
{
size = { 56 56 }
}
}
spacer = {
visible = "[And( EventWindowData.ShouldShowPortraitInfo('sender'), Not( EventWindowData.GetPortraitCharacter('sender').GetDynasty.IsValid ) )]"
size = { 80 80 }
}
}
}
}
expand = {}
### Options
fixedgridbox = {
name = "option_grid"
addcolumn = 654
addrow = 46
datamodel = "[EventWindowData.GetOptions]"
item = {
button_event_letter = {
name = "event_option_button"
parentanchor = hcenter
size = { 592 42 }
tooltip = "[EventOption.GetTooltip]"
tooltip_visible = "[Not( StringIsEmpty( EventOption.GetTooltip ) )]"
onclick = "[EventOption.Select]"
onmousehierarchyenter = "[EventOption.OnEnter]"
onmousehierarchyleave = "[EventOption.OnLeave]"
enabled = "[EventOption.IsValid]"
tooltipwidget = {
using = DefaultTooltipWidget
}
using = tooltip_es
animation_glow_event = {
name = "special_option"
visible = "[And(EventOption.HasFlag('special'), Not(EventOption.HasFlag('dangerous')))]"
}
animation_glow_event = {
name = "dangerous_option"
visible = "[EventOption.HasFlag('dangerous')]"
using = Color_Red
}
### BUTTON CONTENT ####
widget = {
size = { 102 34 }
parentanchor = left|vcenter
hbox = {
fixedgridbox = {
name = "reason_icons"
datamodel = "[EventOption.Reasons]"
addcolumn = 34
addrow = 34
flipdirection = yes
item = {
container = {
icon = {
name = "trait_icon"
datacontext = "[ReasonItem.GetTrait]"
visible = "[ReasonItem.IsTrait]"
alwaystransparent = yes
texture = "[Trait.GetIcon(GetPlayer)]"
size = { 34 34 }
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_TRAIT"
using = tooltip_nw
}
icon = {
name = "skill_icon"
datacontext = "[ReasonItem.GetSkillItem]"
visible = "[ReasonItem.IsSkill]"
alwaystransparent = yes
texture = "gfx/interface/icons/icon_skills.dds"
size = { 34 34 }
framesize = { 60 60 }
frame = "[SkillItem.GetFrame]"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_SKILL"
using = tooltip_ws
}
icon = {
name = "dread_icon"
visible = "[ReasonItem.IsFlag( 'dread' )]"
size = { 34 34 }
texture = "gfx/interface/icons/icon_dread.dds"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_DREAD"
}
icon = {
name = "activity_intent_icon"
visible = "[ReasonItem.IsFlag( 'activity_intent' )]"
size = { 34 34 }
texture = "[GetPlayer.GetInvolvedActivity.GetType.GetIcon]"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_ACTIVITY_INTENT"
}
icon = {
name = "prestige_icon"
visible = "[ReasonItem.IsFlag( 'prestige_level' )]"
size = { 34 34 }
texture = "[GetPlayer.GetPrestigeLevelTexture]"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_PRESTIGE_LEVEL"
}
icon = {
name = "piety_icon"
visible = "[ReasonItem.IsFlag( 'piety_level' )]"
size = { 34 34 }
texture = "[GetPlayer.GetPietyLevelTexture]"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_PIETY_LEVEL"
}
icon = {
name = "faith_icon"
visible = "[ReasonItem.IsFlag( 'faith' )]"
size = { 34 34 }
texture = "[GetPlayer.GetFaith.GetIcon]"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_FAITH"
}
icon = {
name = "estate_building_wine_cellar_icon"
visible = "[ReasonItem.IsFlag( 'estate_building_wine_cellar' )]"
size = { 34 34 }
texture = "gfx/interface/icons/map_icons/map_icon_estate.dds"
tooltip = "EVENT_WINDOW_OPTION_AVAILABLE_ESTATE_BUILDING_WINE_CELLAR"
}
}
}
}
warning_icon = {
name = "timeout_icon"
size = { 34 34 }
visible = "[And( EventOption.IsTimeoutOption, And( GameHasMultiplePlayers, LessThanOrEqualTo_int32( EventWindowData.GetDaysRemaining, '(int32)30' ) ) )]"
tooltip = EVENT_WINDOW_DAYS_REMAINING
}
}
}
hbox = {
text_single = {
text = "[EventOption.GetText]"
default_format = "#light_background"
using = Font_Size_Medium
align = center
layoutpolicy_horizontal = expanding
max_width = 420
fontsize_min = 12
using = Text_Light_Background_Overrides
}
}
widget = {
size = { 102 34 }
parentanchor = right|vcenter
hbox = {
name = "effects_grid"
datamodel = "[EventOption.Effects]"
expand = {}
item = {
container = {
container = {
alwaystransparent = yes
visible = "[OptionEffectItem.IsTrait]"
highlight_icon = {
datacontext = "[OptionEffectItem.GetTrait]"
name = "trait_icon"
size = { 34 34 }
texture = "[Trait.GetIcon(GetPlayer)]"
}
highlight_icon = {
visible = "[OptionEffectItem.IsGain]"
texture = "gfx/interface/icons/symbols/icon_plus_small.dds"
name = "gain"
size = { 20 20 }
}
highlight_icon = {
visible = "[OptionEffectItem.IsLoss]"
texture = "gfx/interface/icons/symbols/icon_minus_small.dds"
name = "loss"
size = { 20 20 }
}
}
container = {
alwaystransparent = yes
visible = "[OptionEffectItem.IsStress]"
highlight_icon = {
visible = "[And(OptionEffectItem.IsGain,Not(OptionEffectItem.IsCritical))]"
texture = "gfx/interface/icons/stress/icon_stress_gain.dds"
name = "stress_gain"
size = { 34 34 }
}
highlight_icon = {
visible = "[OptionEffectItem.IsLoss]"
texture = "gfx/interface/icons/stress/icon_stress_loss.dds"
name = "stress_loss"
size = { 34 34 }
}
highlight_icon = {
visible = "[OptionEffectItem.IsCritical]"
texture = "gfx/interface/icons/stress/icon_stress_gain_critical.dds"
name = "stress_critical"
size = { 34 34 }
}
}
highlight_icon = {
name = "death"
visible = "[OptionEffectItem.IsDeath]"
size = { 34 34 }
texture = "gfx/interface/icons/icon_dead.dds"
}
highlight_icon = {
name = "scheme"
visible = "[OptionEffectItem.IsScheme]"
size = { 34 34 }
texture = "gfx/interface/icons/icon_scheme.dds"
}
}
}
}
}
}
}
}
}
}
}