就这样,内嵌窗口的定义已完成。接下来只需将其添加到相关的国策树中:

然后cyan非常敬业地在日志里把这些图片全部敲了出来顺带汉化了注释,这里也搬了:
(定义窗口)
nordic_alliance_inlay_window = {
window_name = nordic_alliance_ui_window
}
————————————————————
(定义GUI)
guiTypes = {
containerWindowType = {
name = nordic_alliance_ui_window
orientation = lower_left
size = {width = 400 height = 450 }
clipping = no # 避免内嵌窗口裁剪问题
background = {
name = background
quadTextureSprite = "GFX_tiled_window_1b_border"
alwaystransparent = yes
}
instantTextBoxType = {
name ="faction_name"
orientation = upper_left
position = { x = 0 y = 20 }
font = "hoi_36header"
context_aware_text = [Country.GetFactionName]
format = center
maxWidth = 400
}
iconType = {
name = "sweden_frame"
spriteType = "GFX_ascended_advisors_unappointed_frame"
orientation = upper_left
position = { x=55 y=107 }
centerPosition = yes
scale = 0.4
}
iconType = {
name = "Sweden"
spriteType = GFX_blank_leader_portrait
orientation = upper_left
position = { x = 40 y = 90}
context_aware_tooltip = [SWE.GetLeader]
scale = 0.2
}
instantTextBoxType = {
name = "sweden_text"
orientation = upper_left
position = {x = 100 y = 105 }
context_aware_text = {
localization_key = NORDIC_COUNCIL_MEMBER
IN_FACTION = [SWE.NordicCouncilMemberInFaction]
COUNTRY = [SWE.GetNameWithFlag]
}
}
# 以下瑞典条目的复制内容,适用于其他北欧国家。
[...]
————————————————
(完成本地化)
defined_text = {
name = NordicCouncilMemberInFaction
text = {
trigger = {
is_in_faction_with = ROOT
}
localization_key = TRIGGER_FULLFILLED_PREFIX
}
text = {
trigger = {
always = yes
}
localization_key = TRIGGER_UNFULLFILLED_PREFIX
}
}
————————————————————
(添加本地化键)
NORDIC_COUNCIL_MEMBER: "$IN_FACTION$ $COUNTRY|Y$已加入"
——————————————————————
(定义动态头像)
nordic_alliance_inlay_window = {
window_name = nordic_alliance_ui_window
scripted_images = {
Sweden = {
GFX_portrait_SWE_per_albin_hansson = {
SWE = {
has_country_leader = {
ruling_only = yes
character = SWE_per_albin_hansson
}
}
}
GFX_blank_leader_portrait = yes
}
# 在此插入其他北欧国家的定义
[...]
————————————————————
(设置窗口只对拥有北欧联合国策树的国家可见)
nordic_alliance_inlay_window = {
window_name = nordic_alliance_ui_window
internal = yes
visible = {
has_completed_focus = NORDIC_form_joint_alliance
}
[...]
}
——————————————————————
(添加窗口到北欧国家国策树界面)
focus_tree = {
id = sweden_focus
[...]
inlay_window = {
id = nordic_alliance_inlay_window
position = { x = 6500 y = 1000 }
}
[...]
}