This would assign an icon element with the name of my_icon with a texture GFX_my_texture.Īt first glance, this may seem useless, but the power here is that the string accepts scripted localization. The image attribute determines the texture used: Likewise, properties support manipulating the x and y coordinates for an element, with the x and y attributes which change the element position to the value given by a specified variable. Properties support manipulating the frame of a texture directly with the frame attribute, which changes the frame to the value given by a specified variable. Properties allow for specified elements to be manipulated whilst in-game, allowing for their texture and position to be changed. Note that if an element is not visible, the AI will be unable to click on it as well. This can be used for any interface element, such as icons and text. _visible evaluates when the specified element should be visible. Note that _click_enabled overrides the specific triggers such as _right_click_enabled. _click_enabled evaluates when the specified element should be clickable. By default elements are clickable and visible. These are fairly obvious to understand, and can be chained.įor example: my_button_alt_right_click = Triggers ĭefines when interface elements are usable or visible. There are additional modifiers added before the click suffix that alter the type of click recognized. Note that the scripted GUI has to be visible for the AI if it is to use it.ĭefines what effects should be attached to button elements within the interface. When using the selected contexts, it is important to remember that the default scope is that of the selected type, and not the country using the GUI itself, meaning you need to explicitly scope to ROOT when dealing with said country.ĭefines when the scripted GUI is visible for the current scope. This is the only scope that can be implemented into decision categories, like the congress system for USA. This means the default scope is the selected state, and ROOT is the country using the GUI.ĭecision category makes the GUI context that of the country that GUI is displayed for. Selected state context makes the GUI context that of the currently selected state (i.e. This means the default scope is the selected country, and ROOT is the country using the GUI. Selected country context makes the GUI context that of the currently selected country (i.e. This means the default scope is the country using the GUI. Player context makes the GUI context that of the country that GUI is displayed for. Using the selected_state_view or selected_country_view contexts will scope to the last selected country or state when used with these windows.ĭefines the context of the GUI, i.e. If using this method, you must use parent_window_name instead of parent_window_token. tech_tree_my_modded_tree) if none of the tokens above are suitable. You can specifiy the exact window name (i.e. selected_country_view_info (info ledger view with other country).selected_country_view_diplomacy (diplomacy view with other country).diplomacy_tab (only when no country is selected).This is optional, by default a scripted GUI interface will appear anywhere whilst its visible scope is valid. Parent Window Token ĭefines which existing window the scripted GUI interface should be attached to. The scripted GUI creates an instance of the specified container and its elements for each valid user of the scripted GUI. The referenced interface container should be of the type containerWindowType. Here is a general overview of each of the elements within a scripted gui:ĭefines the interface container the scripted GUI uses. Scripted GUIs are placed in /Hearts of Iron IV/common/scripted_guis/. If you spot a mistake then you are welcome to fix it.
0 Comments
Leave a Reply. |