Are there THQB Tutorials?
Posted: Sun Sep 08, 2013 11:56 pm
Is there any Tutorials or help understanding some of the THPS3 .qb code?
Code: Select all
#00029 createmenu STRUCT{
type = verticalmenu //menu type
Id = options_main_menu //menu ID
x = 170.0 // x, y - menu position
y = 90.0
w = 300.0 // w,h - menu width and height
h = 400.0
just_center_x just_center_y blue_top //params, other menus can have more.
eventhandlers = ARRAY( <...> ) //this array contains event handlers, so you can show something different if conditions are met.
children = ARRAY( //children array, aka list of menuelements.
STRUCT{ // this struct creates the blue menu header
type = textmenuelement
auto_id text = "Options"
static dont_gray drawer = title //this part makes it blue and huge
}
STRUCT{ //this struct links to another menu
type = textmenuelement
Id = soundfx_menu
text = "sound options"
link = sfx_menu_container
}
STRUCT{ // this struct links to a function
type = textmenuelement
auto_id
text = "load game"
target = "OptionsMenuLoad"
}
<...>
}
)
Code: Select all
STRUCT{
type = textmenuelement //says that it is menu element
auto_id // you may use this if you don't need actual ID, else you have to use Id = <your_id>. IDs should be unique.
text = "load game" //text that will be shown in menu
target = "OptionsMenuLoad" //target calls 1 function. if you need more than 1, you have to write your own function and call it instead.
//link = sfx_menu_container this may be used instead of target to link to another menu. the menu ID should be called here.
}
Code: Select all
STRUCT{
type = textmenuelement
Id = newfunc_id
text = "Play Special Sound"
target = "LaunchSpecialMessage"
}