Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- id: "titlescreen_controller",
- is_strict: true,
- use_absolute_screen_coordinates: true,
- properties: {
- screen_width: "int :: SCREEN_WIDTH",
- screen_height: "int :: SCREEN_HEIGHT",
- _play_button: { type: "obj button_controller" },
- render: "def() ->commands
- set(animation, lib.util.render_frame(c, ww, hh,
- [
- c.rectangle(0,0,ww,hh),
- c.set_source_rgba(0.2,0.2,0.2,1.0),
- c.fill(),
- ]
- )) where ww = screen_width
- where hh = screen_height
- where c = canvas()",
- init_controls: "def() ->commands
- spawn('button_controller', {
- text: 'Play',
- zorder: zorder+1,
- mid_x: int(screen_width/2),
- mid_y: int(screen_height/2),
- on_click: def() ->commands [
- remove_object(_play_button),
- remove_object(me)],
- use_absolute_screen_coordinates: true,
- }, [
- set(me._play_button, child)
- ])"
- },
- events: {
- being_removed: "spawn('game_controller', {})",
- create: "render(); init_controls()",
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment