gui fixes

This commit is contained in:
trashmasteruni 2026-10-07 22:20:15 +02:00
parent aa65f05b6a
commit 233f4d21dd
3 changed files with 366 additions and 3764 deletions

View file

@ -338,7 +338,7 @@ window = {
}
}
}
window_mass_directives = {}
}
@ -2146,7 +2146,7 @@ types MyRealmWindow
text = "MY_REALM_WINDOW_DESIGNATE_HEIR"
enabled = "[MyRealmWindow.CanDesignateHeir]"
onclick = "[OpenDesignateHeirWindow]"
onclick = "[OpenGameView( 'designate_heir' )]"
tooltip = "MRW_DESIGNATE_HEIR_TT"
}
@ -2672,7 +2672,7 @@ types MyRealmWindow
layoutpolicy_horizontal = expanding
autoresize = no
text = "[Title.GetNameNoTooltip]"
text = "TITLE_NAME_NO_TOOLTIP"
}
hbox = {
@ -2977,7 +2977,7 @@ types MyRealmWindow
text_single = {
layoutpolicy_horizontal = expanding
text = "[Title.GetNameNoTooltip]"
text = "TITLE_NAME_NO_TOOLTIP"
max_width = 180
}
@ -3456,33 +3456,33 @@ types MyRealmWindow
layoutpolicy_horizontal = expanding
spacing = 10
margin = { 10 0 }
button_standard = {
size = { 50 30 }
onclick = "[GetVariableSystem.Toggle('mass_directives_window')]"
onclick = "[GetVariableSystem.Set('compact_vassal_list_realm', 'yes')]"
shortcut = "mass_directives"
tooltip = "MY_REALM_MASS_DIRECTIVES"
down = "[GetVariableSystem.Exists('mass_directives_window')]"
button_give_directive = {
# mirror = horizontal
parentanchor = center
size = { 30 30 }
alwaystransparent = yes
}
}
}
button_menu = {
onclick = "[GetVariableSystem.Toggle('compact_vassal_list_realm')]"
onclick = "[GetVariableSystem.Clear('mass_directives_window')]"
tooltip = "MY_REALM_COMPACT_SUBJECT_LIST"
shortcut = "compact_subject_list_realm"
}
expand = {}
blockoverride "dropdown_size"
{
size = { 210 32 }
@ -3490,7 +3490,7 @@ types MyRealmWindow
blockoverride "dropdown_list_maxsize"
{
maximumsize = { 202 250 }
}
}
dropdown_menu_standard = {
name = "government_filters_dropdown"
@ -3560,46 +3560,46 @@ types MyRealmWindow
margin = { 0 10 }
using = Animation_Tab_Switch
vbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
visible = "[Not(GetVariableSystem.Exists('compact_vassal_list_realm'))]"
fixedgridbox = {
datacontext = "[MyRealmWindow.GetPowerfulVassals]"
datamodel = "[CharacterSelectionList.GetList]"
visible = "[And( Not( CharacterSelectionList.IsBuildingList ), Not( IsDataModelEmpty( CharacterSelectionList.GetList ) ) )]"
layoutpolicy_horizontal = expanding
addcolumn = 538
addrow = 176
setitemsizefromcell = yes
item = {
widget_vassal_list_item = {
datacontext = "[CharacterListItem.GetCharacter]"
datacontext = "[MyRealmWindow.GetVassalInfo( Character.Self )]"
datacontext = "[MyRealmWindowVassalItem.GetContract]"
background = {
using = Background_Frame
}
}
}
}
fixedgridbox = {
datacontext = "[MyRealmWindow.GetTributaries]"
datamodel = "[CharacterSelectionList.GetList]"
visible = "[And( Not( CharacterSelectionList.IsBuildingList ), Not( IsDataModelEmpty( CharacterSelectionList.GetList ) ) )]"
layoutpolicy_horizontal = expanding
addcolumn = 538
addrow = 176
setitemsizefromcell = yes
item = {
widget_vassal_list_item = {
name = tutorial_highlight_vassal
@ -3609,17 +3609,17 @@ types MyRealmWindow
}
}
}
fixedgridbox = {
datacontext = "[MyRealmWindow.GetRegularVassals]"
datamodel = "[CharacterSelectionList.GetList]"
visible = "[And( Not( CharacterSelectionList.IsBuildingList ), Not( IsDataModelEmpty( CharacterSelectionList.GetList ) ) )]"
layoutpolicy_horizontal = expanding
addcolumn = 538
addrow = 185
setitemsizefromcell = yes
item = {
widget_vassal_list_item = {
name = tutorial_highlight_vassal
@ -3629,16 +3629,16 @@ types MyRealmWindow
}
}
}
expand = {}
}
vbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
visible = "[GetVariableSystem.Exists('compact_vassal_list_realm')]"
vbox_compact_subjects = {
datacontext = "[MyRealmWindow.GetPowerfulVassals]"
blockoverride "text" {
@ -3660,7 +3660,7 @@ types MyRealmWindow
max_width = 510
}
}
expand = {}
}
@ -3674,33 +3674,33 @@ types MyRealmWindow
expand = {}
}
type vbox_compact_subjects = vbox {
layoutpolicy_horizontal = expanding
visible = "[DataModelHasItems(CharacterSelectionList.GetList)]"
oncreate = "[BindFoldOutContext]"
oncreate = "[PdxGuiFoldOut.Unfold]"
button_expandable_toggle_field = {}
blockoverride "show_portrait_status_icons" {
visible = "[Not(GetVariableSystem.Exists('mass_directives_window'))]"
}
vbox = {
margin_left = 5
layoutpolicy_horizontal = expanding
visible = "[PdxGuiFoldOut.IsUnfolded]"
fixedgridbox_compact_subjects = {}
}
}
}
type fixedgridbox_compact_subjects = fixedgridbox {
datamodel = "[CharacterSelectionList.GetList]"
visible = "[And( Not( CharacterSelectionList.IsBuildingList ), Not( IsDataModelEmpty( CharacterSelectionList.GetList ) ) )]"
block "gridbox_size" {
layoutpolicy_horizontal = expanding
addcolumn = 90
@ -3708,11 +3708,11 @@ types MyRealmWindow
}
datamodel_wrap = 6
flipdirection = yes
item = {
widget_compact_vassal_list_item = {
datacontext = "[CharacterListItem.GetCharacter]"
widget = {
size = { 40 40 }
parentanchor = bottom|right
@ -3720,19 +3720,19 @@ types MyRealmWindow
block "directive_button" {
visible = "[GetVariableSystem.Exists('mass_directives_window')]"
}
widget = {
visible = "[Character.IsPlayerInteractionShown('give_vassal_directive_interaction')]"
size = { 100% 100% }
button_round = {
size = { 100% 100% }
enabled = "[Character.IsPlayerInteractionValid('give_vassal_directive_interaction')]"
onclick = "[Character.OpenPlayerInteraction('give_vassal_directive_interaction')]"
tooltip = "[Character.GetPlayerInteractionTooltip('give_vassal_directive_interaction')]"
using = tooltip_se
text_single = {
parentanchor = center
text = "[Character.Custom('vassal_directive_icon')]"
@ -3740,8 +3740,8 @@ types MyRealmWindow
using = Font_Size_Tiny
alwaystransparent = yes
alpha = "[Select_float( Character.IsPlayerInteractionValid('give_vassal_directive_interaction') , '(float)1.0', '(float)0.25' )]"
tooltip = "VASSAL_DIRECTIVE_ICON_TOOLTIP"
using = tooltip_se
}
@ -3846,7 +3846,7 @@ types MyRealmWindow
text = "MY_REALM_WINDOW_SUCCESSION_DESIGNATE_HEIR"
enabled = "[MyRealmWindow.CanDesignateHeir]"
onclick = "[OpenDesignateHeirWindow]"
onclick = "[OpenGameView( 'designate_heir' )]"
tooltip = "MRW_DESIGNATE_HEIR_TT"
}
@ -3943,7 +3943,7 @@ types MyRealmWindow
button_change = {
size = { 24 24 }
parentanchor = center
onclick = "[OpenSuccessionLawChangeWindow( GuiLawGroup.Self )]"
onclick = "[OpenGameViewData( 'succession_law_change', GuiLawGroup.Self )]"
}
}
}
@ -4022,7 +4022,7 @@ types MyRealmWindow
button_election_vote = {
parentanchor = center
onclick = "[OpenSuccessionElectionWindowForTitle(Title.Self)]"
onclick = "[OpenGameViewData( 'title_election', Title.Self )]"
tooltip = "MY_REALM_WINDOW_VOTE_TOOLTIP"
}
}
@ -4146,7 +4146,7 @@ types MyRealmWindow
blockoverride "show_law"
{
visible = "[And( GuiLawGroup.IsAvailable, Or( GuiLawGroup.GetLawGroup.HasFlag( 'succession_order_laws' ), Or( GuiLawGroup.GetLawGroup.HasFlag( 'succession_gender_laws' ), GuiLawGroup.GetLawGroup.HasFlag( 'imperial_policy' ) ) ) )]"
visible = "[And( GuiLawGroup.IsAvailable, Or4( GuiLawGroup.GetLawGroup.HasFlag( 'succession_order_laws' ), GuiLawGroup.GetLawGroup.HasFlag( 'succession_gender_laws' ), GuiLawGroup.GetLawGroup.HasFlag( 'imperial_policy' ), GuiLawGroup.GetLawGroup.HasFlag( 'church_policy' ) ) )]"
}
}
@ -4165,8 +4165,7 @@ types MyRealmWindow
visible = "[ObjectsEqual( Title.Self, Character.GetPrimaryTitle.Self )]"
text = "MY_REALM_WINDOW_VOTE"
onclick = "[OpenSuccessionElectionWindowForTitle(Title.Self)]"
onclick = "[OpenGameViewData( 'title_election', Title.Self )]"
tooltip = "MY_REALM_WINDOW_VOTE_TOOLTIP"
}
}
@ -4245,7 +4244,7 @@ types MyRealmWindow
}
button_standard = {
visible = "[And( Character.IsIndependentRuler, Character.HasTreasury )]"
visible = "[And3( Character.IsIndependentRuler, Character.HasTreasury, Not( Character.GetGovernment.HasGovernmentFlag( 'government_is_ecclesiastical' ) ) )]"
size = { 320 44 }
onclick = "[OpenGameViewData( 'treasury_budget_change', GetPlayer.Self )]"
@ -4415,76 +4414,76 @@ types MyRealmWindow
}
}
}
type window_mass_directives = window {
size = { 500 900 }
parentanchor = right|vcenter
position = { -630 0 }
using = Window_Background_Subwindow
# visible = "[GetVariableSystem.Exists('mass_directives_window')]"
visible = no
state = {
name = _show
using = Animation_FadeIn_Quick
position = { -630 0 }
}
state = {
name = _hide
using = Animation_FadeOut_Quick
position_x = -620
}
vbox = {
layoutpolicy_horizontal = expanding
margin = { 4 4 }
header_pattern = {
layoutpolicy_horizontal = expanding
blockoverride "header_text"
{
text = "MASS_DIRECTIVES_TITLE"
margin = { 30 0 }
}
blockoverride "button_close"
{
onclick = "[GetVariableSystem.Clear('mass_directives_window')]"
}
}
vbox = {
layoutpolicy_horizontal = expanding
margin = { 15 0 }
margin_top = 5
spacing = 10
hbox = {
layoutpolicy_horizontal = expanding
text_single = {
layoutpolicy_horizontal = expanding
autoresize = no
multiline = yes
text = "MASS_DIRECTIVES_TIP"
align = nobaseline|center
}
}
vbox = {
layoutpolicy_horizontal = expanding
spacing = 10
# all the filters can be left for the future
# visible = no
button_standard_list = {
enabled = no
size = { 0 40 }
@ -4493,11 +4492,11 @@ types MyRealmWindow
using = Font_Type_Flavor
using = Font_Size_Medium
}
hbox = {
layoutpolicy_horizontal = expanding
blockoverride "dropdown_size"
{
size = { 230 32 }
@ -4505,67 +4504,67 @@ types MyRealmWindow
blockoverride "dropdown_list_maxsize"
{
maximumsize = { 222 250 }
}
}
# TODO Faith filter
dropdown_menu_standard = {
dropdown_menu_standard = {
blockoverride "dropdown_properties"
{
datamodel = "[MyRealmWindow.GetGovernmentTypeFilters]"
onselectionchanged = "[MyRealmWindow.SelectActiveGovernmentTypeFilter]"
selectedindex = "[MyRealmWindow.GetActiveGovernmentTypeFilterIndex]"
}
blockoverride "dropdown_active_item_properties"
{
text = "MRW_GOVERNMENT_FILTER"
tooltip = "MRW_GOVERNMENT_FILTER_DROPDOWN_TT"
}
blockoverride "dropdown_item_properties"
{
text = "MRW_GOVERNMENT_FILTER"
tooltip = "MRW_GOVERNMENT_FILTER_TT"
}
}
expand = {}
# TODO Culture filter
dropdown_menu_standard = {
blockoverride "dropdown_properties"
{
datamodel = "[MyRealmWindow.GetGovernmentTypeFilters]"
onselectionchanged = "[MyRealmWindow.SelectActiveGovernmentTypeFilter]"
selectedindex = "[MyRealmWindow.GetActiveGovernmentTypeFilterIndex]"
}
blockoverride "dropdown_active_item_properties"
{
text = "MRW_GOVERNMENT_FILTER"
tooltip = "MRW_GOVERNMENT_FILTER_DROPDOWN_TT"
}
blockoverride "dropdown_item_properties"
{
text = "MRW_GOVERNMENT_FILTER"
tooltip = "MRW_GOVERNMENT_FILTER_TT"
}
}
}
hbox = {
layoutpolicy_horizontal = expanding
visible = "[GetPlayer.IsValid]"
margin_left = 3
spacing = 5
button_checkbox_label = {
background = { using = Background_Area_Border }
layoutpolicy_horizontal = expanding
@ -4580,7 +4579,7 @@ types MyRealmWindow
min_width = 190
}
}
button_checkbox_label = {
layoutpolicy_horizontal = expanding
background = { using = Background_Area_Border }
@ -4596,29 +4595,29 @@ types MyRealmWindow
}
}
}
hbox = {
layoutpolicy_horizontal = expanding
# visible = has admin vassals
# datamodel = "[GetAllAdministrativeObligations]"
datamodel = "[GetNullCharacterDataModel( '(int32)6')]"
spacing = 5
spacing = 5
item = {
button_standard_list = {
layoutpolicy_horizontal = expanding
size = { 0 30 }
hbox = {
layoutpolicy_horizontal = expanding
margin = { 5 0 }
text_single = {
raw_text = "@naval_administration!"
align = nobaseline
alwaystransparent = yes
}
text_single = {
layoutpolicy_horizontal = expanding
autoresize = no
@ -4629,52 +4628,52 @@ types MyRealmWindow
}
}
}
expand = {}
}
hbox = {
layoutpolicy_horizontal = expanding
margin_left = 10
text_label_left = {
layoutpolicy_horizontal = expanding
autoresize = no
margin = { 0 5 }
align = nobaseline
text = "ACTIVE_DIRECTIVES_HEADER"
text = "ACTIVE_DIRECTIVES_HEADER"
}
}
hbox = {
layoutpolicy_horizontal = expanding
margin_left = 5
dynamicgridbox = {
datamodel = "[GetNullCharacterDataModel( '(int32)10')]"
flipdirection = yes
datamodel_wrap = 7
layoutpolicy_horizontal = expanding
item = {
widget = {
size = { 65 35 }
button_standard_list = {
size = { 60 30 }
hbox = {
layoutpolicy_horizontal = expanding
margin = { 5 0 }
text_single = {
raw_text = "@task_develop_county!"
align = nobaseline
alwaystransparent = yes
using = Font_Size_Tiny
}
text_single = {
layoutpolicy_horizontal = expanding
autoresize = no
@ -4688,33 +4687,33 @@ types MyRealmWindow
}
}
}
}
hbox = {
layoutpolicy_horizontal = expanding
margin = { 10 5 }
background = {
using = Background_Area_Dark
alpha = 0.7
margin_left = 16
margin_right = 10
modify_texture = {
texture = "gfx/interface/component_masks/mask_fade_horizontal_extended.dds"
blend_mode = alphamultiply
}
}
text_single = {
layoutpolicy_horizontal = expanding
autoresize = no
margin = { 0 5 }
align = nobaseline
text = "ISSUE_DIRECTIVES_HEADER"
}
text_single = {
layoutpolicy_horizontal = expanding
autoresize = no
@ -4727,33 +4726,33 @@ types MyRealmWindow
scrollbox = {
layoutpolicy_horizontal = expanding
layoutpolicy_vertical = expanding
blockoverride "scrollbox_content" {
vbox = {
layoutpolicy_horizontal = expanding
datamodel = "[GetNullCharacterDataModel('(int32)10')]"
# datamodel = "all directives that can be applied to selected vassals, including No Directive"
spacing = 1
item = {
button_standard = {
layoutpolicy_horizontal = expanding
size = { 0 38 }
# onclick = " apply this directive to selected vassals"
hbox = {
layoutpolicy_horizontal = expanding
margin = { 10 0 }
margin_right = 15
spacing = 5
text_single = {
raw_text = "@task_develop_county!"
align = nobaseline
using = Font_Size_Tiny
}
text_single = {
layoutpolicy_horizontal = expanding
autoresize = no
@ -4761,9 +4760,9 @@ types MyRealmWindow
raw_text = "Directive name"
alwaystransparent = yes
}
expand = {}
text_single = {
autoresize = no
size = { 35 20 }