1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# Dialog controllers are generic objects designed to be used as triggers for scripts.
# Various usages include modifying:
# - on_create to trigger something on the start of a level.
# - on_triggered to trigger something when the player reaches a certain spot
{
id: "progress_bar_controller",
zorder: 50,
always_active: true,
hidden_in_game: true,
//use_absolute_screen_coordinates: true,
editor_info: {
category: "controllers",
var: [{
name: "width",
type: "int",
value: "200",
},{
name: "height",
type: "int",
value: "50",
},
],
},
vars: {
Widget: {
type: "progress",
id: "a",
padding: [12,6],
rect: [0,0,200,50],
min: 0,
max: 100,
frame_set: "default_button",
colour: "grey",
},
},
on_editor_changed_variable: "fire_event('create')",
on_create: "[
set_widgets(nwgt),
set(self.vars.Widget, nwgt),
] where
nwgt = self.vars.Widget
+ { rect: self.vars.Widget.rect[0:2] + [self.vars.width, self.vars.height]
}",
on_end_anim: "animation('normal')",
animation: {
id: "normal",
image: "effects/particles.png",
x: 86,
y: 73,
w: 28,
h: 28,
collide: [0,0,28,28],
frames: 1,
duration: 1000,
},
}
|