352 lines
8.1 KiB
Text
352 lines
8.1 KiB
Text
types TutorialWindow {
|
|
type tutorial_window = window {
|
|
alwaystransparent = no
|
|
resizable = no
|
|
parentanchor = center
|
|
|
|
state = {
|
|
name = _show
|
|
using = Animation_FadeIn_Quick
|
|
using = Sound_WindowShow_Standard
|
|
|
|
}
|
|
|
|
state = {
|
|
name = _hide
|
|
using = Animation_FadeOut_Quick
|
|
using = Sound_WindowHide_Standard
|
|
}
|
|
|
|
icon = {
|
|
parentanchor = center
|
|
size = { 180% 180% }
|
|
alwaystransparent = yes
|
|
texture = "gfx/interface/component_masks/mask_fade_circle.dds"
|
|
color = { 0.1 0.1 0.1 1 }
|
|
alpha = 0.6
|
|
}
|
|
|
|
icon = {
|
|
parentanchor = center
|
|
size = { 160% 160% }
|
|
alwaystransparent = yes
|
|
|
|
texture = "gfx/interface/component_masks/mask_fade_circle.dds"
|
|
using = Color_Orange
|
|
|
|
state = {
|
|
trigger_on_create = yes
|
|
name = a
|
|
next = b
|
|
|
|
using = Animation_Curve_Default
|
|
duration = 1
|
|
alpha = 0.7
|
|
}
|
|
|
|
state = {
|
|
name = b
|
|
next = a
|
|
|
|
using = Animation_Curve_Default
|
|
duration = 2
|
|
alpha = 0
|
|
}
|
|
}
|
|
|
|
state = {
|
|
name = center
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)0', '(float)0' )]"
|
|
}
|
|
|
|
state = {
|
|
name = top_center
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)0', '(float)-20' )]"
|
|
}
|
|
|
|
state = {
|
|
name = bottom_center
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)0', '(float)20' )]"
|
|
}
|
|
|
|
state = {
|
|
name = bottom_left
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)-30', '(float)20' )]"
|
|
}
|
|
|
|
state = {
|
|
name = far_bottom_left
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)-35', '(float)25' )]"
|
|
}
|
|
|
|
state = {
|
|
name = top_left
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)-35', '(float)-20' )]"
|
|
}
|
|
|
|
state = {
|
|
name = left
|
|
using = Animation_Curve_Default
|
|
duration = 0.5
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)-25', '(float)0' )]"
|
|
}
|
|
|
|
state = {
|
|
name = far_left
|
|
using = Animation_Curve_Default
|
|
duration = 0.5
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)-35', '(float)0' )]"
|
|
}
|
|
|
|
state = {
|
|
name = right
|
|
using = Animation_Curve_Default
|
|
duration = 0.5
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)25', '(float)0' )]"
|
|
}
|
|
|
|
state = {
|
|
name = far_right
|
|
using = Animation_Curve_Default
|
|
duration = 0.5
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)35', '(float)0' )]"
|
|
}
|
|
|
|
state = {
|
|
name = bottom_right
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)35', '(float)18' )]"
|
|
}
|
|
|
|
state = {
|
|
name = bottom_right_min
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)25', '(float)15' )]"
|
|
}
|
|
|
|
state = {
|
|
name = top_right
|
|
using = Animation_Curve_Default
|
|
duration = 0.3
|
|
position = "[GetGuiPositionFromPercentCoordinates( PdxGuiWidget.Self, '(float)30', '(float)-15' )]"
|
|
}
|
|
|
|
vbox = {
|
|
margin_top = 33
|
|
margin_bottom = 35
|
|
set_parent_size_to_minimum = yes
|
|
|
|
using = Window_Background_NoDecoration
|
|
using = Window_Margins
|
|
|
|
header_pattern = {
|
|
layoutpolicy_horizontal = expanding
|
|
|
|
hbox = {
|
|
margin = { 15 0 }
|
|
|
|
hbox = {
|
|
layoutpolicy_horizontal = expanding
|
|
layoutstretchfactor_horizontal = 1
|
|
}
|
|
|
|
text_single = {
|
|
layoutpolicy_horizontal = expanding
|
|
layoutstretchfactor_horizontal = 1
|
|
text = "[Tutorial.GetStepName]"
|
|
max_width = 420
|
|
align = nobaseline|center
|
|
|
|
using = Font_Type_Flavor
|
|
using = Font_Size_Big
|
|
}
|
|
|
|
button_standard = {
|
|
visible = "[InDebugMode]"
|
|
raw_text = "Debug"
|
|
default_format = "#D"
|
|
onclick = "[ExecuteConsoleCommand('tutorial.debugwindow')]"
|
|
max_width = 80
|
|
}
|
|
|
|
hbox = {
|
|
layoutpolicy_horizontal = expanding
|
|
layoutstretchfactor_horizontal = 1
|
|
|
|
expand = {
|
|
visible = "[Not( Tutorial.HasTransition( 'read_later' ) )]"
|
|
}
|
|
|
|
text_single = {
|
|
visible = "[Not( StringIsEmpty( Tutorial.GetStepHeaderInfo ) )]"
|
|
raw_text = "([Tutorial.GetStepHeaderInfo])"
|
|
default_format = "#weak"
|
|
align = nobaseline
|
|
|
|
using = Font_Size_Medium
|
|
}
|
|
|
|
expand = {
|
|
visible = "[Tutorial.HasTransition( 'read_later' )]"
|
|
}
|
|
}
|
|
}
|
|
|
|
blockoverride "header_text"
|
|
{
|
|
text = ""
|
|
}
|
|
|
|
blockoverride "button_back"
|
|
{
|
|
visible = no
|
|
}
|
|
|
|
blockoverride "button_close"
|
|
{
|
|
visible = "[Tutorial.HasTransition('read_later')]"
|
|
enabled = "[Tutorial.IsTransitionEnabled('read_later')]"
|
|
tooltip = "tutorial_lesson_button_read_later"
|
|
onclick = "[Tutorial.OnClickTransition('read_later')]"
|
|
}
|
|
}
|
|
|
|
scrollbox = {
|
|
autoresizescrollarea = yes
|
|
blockoverride "scrollbox_content"
|
|
{
|
|
# this might break with really, really long localizations
|
|
set_parent_size_to_minimum = yes
|
|
|
|
text_multi = {
|
|
max_width = 490
|
|
min_width = 490
|
|
autoresize = yes
|
|
text = "[Tutorial.GetStepText]"
|
|
using = Font_Size_Medium
|
|
}
|
|
|
|
vbox = {
|
|
visible = "[Tutorial.HasStepInstructions]"
|
|
layoutpolicy_vertical = preferred
|
|
|
|
text_single = {
|
|
layoutpolicy_horizontal = expanding
|
|
margin_top = 20
|
|
margin_bottom = 5
|
|
|
|
text = "TUTORIAL_STEP_INSTRUCTIONS"
|
|
using = Font_Size_Medium
|
|
}
|
|
|
|
text_multi = {
|
|
max_width = 430
|
|
min_width = 430
|
|
|
|
autoresize = yes
|
|
text = "[Tutorial.GetStepInstructions]"
|
|
using = Font_Size_Medium
|
|
}
|
|
|
|
expand = {}
|
|
}
|
|
|
|
|
|
}
|
|
blockoverride "scrollbox_expand"
|
|
{
|
|
expand = {}
|
|
|
|
hbox = {
|
|
layoutpolicy_horizontal = expanding
|
|
visible = "[Tutorial.HasTransition('full_tutorial_explanation')]"
|
|
max_width = 490
|
|
min_width = 490
|
|
|
|
text_single = {
|
|
align = left
|
|
text = "[Tutorial.GetTransitionText('full_tutorial_explanation')]"
|
|
margin_left = 5
|
|
}
|
|
|
|
expand = {}
|
|
|
|
text_single = {
|
|
align = right
|
|
text = "[Tutorial.GetTransitionText('quick_tutorial_explanation')]"
|
|
margin_right = 5
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
hbox = {
|
|
layoutpolicy_horizontal = expanding
|
|
margin = { 10 10 }
|
|
spacing = 5
|
|
|
|
button_tertiary = {
|
|
size = { 150 33 }
|
|
visible = "[Tutorial.HasTransition('back')]"
|
|
enabled = "[Tutorial.IsTransitionEnabled('back')]"
|
|
text = "[Tutorial.GetTransitionText('back')]"
|
|
onclick = "[Tutorial.OnClickTransition('back')]"
|
|
}
|
|
|
|
button_standard = {
|
|
size = { 150 33 }
|
|
visible = "[Tutorial.HasTransition('repeat')]"
|
|
enabled = "[Tutorial.IsTransitionEnabled('repeat')]"
|
|
text = "[Tutorial.GetTransitionText('repeat')]"
|
|
onclick = "[Tutorial.OnClickTransition('repeat')]"
|
|
}
|
|
|
|
expand = {}
|
|
|
|
button_tertiary = {
|
|
size = { 150 33 }
|
|
visible = "[Tutorial.HasTransition('skip')]"
|
|
enabled = "[Tutorial.IsTransitionEnabled('skip')]"
|
|
text = "[Tutorial.GetTransitionText('skip')]"
|
|
onclick = "[Tutorial.OnClickTransition('skip')]"
|
|
}
|
|
|
|
button_primary = {
|
|
name = "tutorial_highlight_next_button"
|
|
size = { 150 33 }
|
|
visible = "[Tutorial.HasTransition('next')]"
|
|
enabled = "[Tutorial.IsTransitionEnabled('next')]"
|
|
text = "[Tutorial.GetTransitionText('next')]"
|
|
onclick = "[Tutorial.OnClickTransition('next')]"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tutorial_window = {
|
|
name = "tutorial_window"
|
|
|
|
using = Window_Movable
|
|
position = { 0 0 }
|
|
layer = tutorial
|
|
|
|
visible = "[And( Tutorial.ShouldBeVisible, Not(IsGameViewOpen('barbershop')) )]" # hide the widget itself so as to avoid short single-frame glitches when hiding/showing the window
|
|
}
|