Newer
Older
Import / applications / HighwayDash / ports / Data / ui.json
{
  "name" : "Blocky Froggy",
  "actions" : {
    "onLaunchOld" : [ "push:game_wait", "push:welcome", "push:character_select", "push:welcome", "push:motd" ],
    "onLaunch"    : [ "push:game", "push:motd" ],
    "onGameOver"  : [ "goto:game_over" ]
  },
  "dialogs" : {


     "character_select" :
     {
      "stage" : "selector",
      "views" : [
        { "view" : "CaroselTest",     "x" :   0, "y" :   0,  "w" : 640, "h" : 960 }
      ],
      "controls" : [
        { "type" : "Script", "lua" : "selector.lua" },
        { "type" : "Label",      "x" : 230, "y" : 100, "text" : "Selector" },
        { "type" : "ToolButton", "x" :  10, "y" : 640, "icon" : 0, "actions" : { "onMouseClicked" : [ "exec:nextModel" ] } },
        { "type" : "ToolButton", "x" : 580, "y" : 640, "icon" : 1, "actions" : { "onMouseClicked" : [ "exec:prevModel" ] } },
        { "type" : "Button",     "x" : 180, "y" : 740, "text" : "Okay",    "actions" : { "onMouseClicked" : [ "goto:character_edit" ] } }
      ],
      "actions" : {
        "onTap"        : [ "exec:tapped" ],
        "onSwipeLeft"  : [ "exec:nextModel" ],
        "onSwipeRight" : [ "exec:prevModel" ]
      }
     },


     "motd" : 
     {
      "stage" : "motd",
      "controls" : [
        { "type" : "Button",    "x" : 180, "y" : 740, "text" : "Okay",    "actions" : { "onMouseClicked" : [ "pop" ] } }
      ]
     },


     "welcome" : 
     {
      "stage" : "blank",
      "views" : [
        { "view" : "RotatingFrog",    "x" :   0, "y" :   0,  "w" : 640, "h" : 960 }
      ],
      "controls" : [
        { "type" : "Script", "lua" : "test.lua" },
        { "type" : "Rectangle", "x" :   0, "y" :   0,  "w" : 640, "h" : 960, "r" : 4, "g" : 199, "b" : 0, "a" : 255,
          "animations" : [ 
          { "timeScale" : 1000, "curve" : "linear", "loop" : "no", "parameter" : "a", "t0" :  255, "t1" : 0 }
          ] },
        { "type" : "Image",     "x" :  60, "y" : 170,  "asset" : "splash1.png" },
        { "type" : "Image",     "x" : 315, "y" : 170,  "asset" : "splash2.png" },
        { "type" : "Image",     "x" :  60, "y" : 425,  "asset" : "splash3.png" },
        { "type" : "Image",     "x" : 315, "y" : 425,  "asset" : "splash4.png" },
        { "type" : "Label",     "x" : 230, "y" : 100, "text" : "Welcome" },
        { "type" : "Button",    "x" : 180, "y" : 740, "text" : "Okay",    "actions" : { "onMouseClicked" : [ "exec:helloWorld" , "pop" ] } }
      ]
     },


     "character_edit" :
     {
      "stage" : "editor",
      "background" : [
        { "type" : "Label", "x" : 255, "y" : 10, "text" : "Editor" },
        { "type" : "Frame", "x" :   6, "y" :  80, "w" : 308, "h" : 330,  "text" : "Preview" },
        { "type" : "Frame", "x" : 324, "y" :  80, "w" : 308, "h" : 330,  "text" : "Layer" },
        { "type" : "Frame", "x" :   6, "y" : 450, "w" : 308, "h" : 330,  "text" : "Color" },
        { "type" : "Frame", "x" : 324, "y" : 450, "w" : 308, "h" : 330,  "text" : "Editor" }
      ],
      "views" : [
        { "view" : "RotatingModelPreview",  "x" :   8, "y" :  82,  "w" : 304, "h" : 327 },
        { "view" : "ModelEditView",         "x" : 326, "y" :  82,  "w" : 304, "h" : 327 }
      ],
      "controls" : [
        { "type" : "Slider",    "x" :  590, "y" : 105,  "h" : 270, "binding" : "SLIDER_VAL"  },
        { "type" : "ToolButton", "x" : 330, "y" : 455, "icon" : 23 },
        { "type" : "ToolButton", "x" : 380, "y" : 455, "icon" : 23 },
        { "type" : "ToolButton", "x" :  10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
        { "type" : "ToolButton", "x" : 300, "y" : 800, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
        { "type" : "ToolButton", "x" : 580, "y" : 800, "icon" : 13, "actions" : { "onMouseClicked" : [ "push:menu" ] } },
        { "type" : "Button",    "x" : 180, "y" : 800, "text" : "Okay",    "actions" : { "onMouseClicked" : [ "exec:helloWorld" , "goto:game_wait" ] } }
      ]
     },


     "game_wait" :
     {
      "stage" : "game",
      "controls" : [
        { "type" : "Label", "x" : 255, "y" : 10, "text" : "Blocky" },
        { "type" : "Label", "x" : 255, "y" : 40, "text" : "Froggy" },
        { "type" : "Label", "x" : 10,  "y" : 10, "text" : "Score" },
        { "type" : "Label", "x" : 10,  "y" : 40, "text" : "${SCORE}" },

        { "type" : "Label", "x" : 630, "y" : 10, "align" : 1, "text" : "Highest" },
        { "type" : "Label", "x" : 630, "y" : 40, "align" : 1, "text" : "${HIGH_SCORE}" },

        { "type" : "Button",    "x" : 180, "y" : 740, "text" : "Start", "actions" : { "onMouseClicked" : [ "goto:game" ] }  },

        { "type" : "ToolButton", "x" :  10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
        { "type" : "ToolButton", "x" : 300, "y" : 800, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
        { "type" : "ToolButton", "x" : 580, "y" : 800, "icon" : 13, "actions" : { "onMouseClicked" : [ "push:menu" ] } }
      ]
     },

     "game_old" : 
     {
      "stage" : "game",
      "controls" : [
        { "type" : "Label", "x" : 255, "y" : 10, "text" : "Blocky" },
        { "type" : "Label", "x" : 255, "y" : 40, "text" : "Froggy" },
        { "type" : "Label", "x" : 10,  "y" : 10, "text" : "Score" },
        { "type" : "Label", "x" : 10,  "y" : 40, "text" : "${SCORE}" },

        { "type" : "Label", "x" : 630, "y" : 10, "align" : 1, "text" : "Highest" },
        { "type" : "Label", "x" : 630, "y" : 40, "align" : 1, "text" : "${HIGH_SCORE}" },

        { "type" : "ToolButton", "x" :  10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
        { "type" : "ToolButton", "x" : 300, "y" : 800, "icon" : 22, "actions" : { "onMouseClicked" : [ "push:welcome" ] } },
        { "type" : "ToolButton", "x" : 580, "y" : 800, "icon" : 13, "actions" : { "onMouseClicked" : [ "push:menu" ] } }
      ],
      "actions" : { "onExit"   : [ "goto:game_over" ] }
     },


     "game" : 
     {
      "stage" : "game",
      "controls" : [
        { "type" : "Label", "x" : 255, "y" : 10, "text" : "Blocky" },
        { "type" : "Label", "x" : 255, "y" : 40, "text" : "Froggy" },
        { "type" : "Label", "x" : 10,  "y" : 10, "text" : "Score" },
        { "type" : "Label", "x" : 10,  "y" : 40, "text" : "${SCORE}" },

        { "type" : "Label", "x" : 630, "y" : 10, "align" : 1, "text" : "Highest" },
        { "type" : "Label", "x" : 630, "y" : 40, "align" : 1, "text" : "${HIGH_SCORE}" }

      ],
      "actions" : { "onExit"   : [ "goto:game_over" ] }
     },


     "menu" :
     {
      "stage" : "game",
      "controls" : [
        { "type" : "Label", "x" : 255, "y" : 10, "text" : "Menu" },
        { "type" : "ToolButton", "x" : 580, "y" : 800, "icon" : 12, "actions" : { "onMouseClicked" : [ "pop" ] } }
      ]
     },


     "settings" :
     {
      "stage" : "blank",
      "controls" : [
        { "type" : "Label",      "x" : 245, "y" : 10,  "text" : "Settings" },
        { "type" : "CheckBox",   "x" : 80,  "y" : 100, "text" : "Enable Shadows ${ENABLE_SHADOWS}",                 "binding" : "ENABLE_SHADOWS"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 130, "text" : "Enable Shadow Attenuation ${ENABLE_SHADOW_ATTN}",  "binding" : "ENABLE_SHADOW_ATTN"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 160, "text" : "Enable Distance Fog ${ENABLE_DISTANCE_FOG}",       "binding" : "ENABLE_DISTANCE_FOG"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 190, "text" : "Enable Ramp Shading ${ENABLE_RAMP_SHADING}",       "binding" : "ENABLE_RAMP_SHADING"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 220, "text" : "Enable Darkened Sides ${ENABLE_DARKENED_SIDES}",   "binding" : "ENABLE_DARKENED_SIDES"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 250, "text" : "Enable Textures ${ENABLE_TEXTURES}",               "binding" : "ENABLE_TEXTURES"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 280, "text" : "Enable Bevels ${ENABLE_BEVELS}",                   "binding" : "ENABLE_BEVELS"  },
        { "type" : "CheckBox",   "x" : 80,  "y" : 310, "text" : "Enable Lighting ${ENABLE_LIGHTING}",               "binding" : "ENABLE_LIGHTING"  },
        { "type" : "ToolButton", "x" : 10,  "y" : 100, "icon" : 13         },
        { "type" : "Button",     "x" : 10,  "y" : 800, "text" : "Cheats", "actions" : { "onMouseClicked" : [ "push:cheats" ] } },
        { "type" : "Button",     "x" : 380, "y" : 800, "text" : "Back",   "actions" : { "onMouseClicked" : [ "pop" ] } }
      ]
     },


     "cheats" :
     {
      "stage" : "blank",
      "controls" : [
        { "type" : "Label",    "x" : 225, "y" : 10,  "text" : "Cheats/Debug" },
        { "type" : "CheckBox", "x" : 80,  "y" : 100, "text" : "Debugging ${DEBUG}",  "binding" : "DEBUG"  },
        { "type" : "CheckBox", "x" : 80,  "y" : 130, "text" : "Debugging camera ${DEBUG_CAMERA}",  "binding" : "DEBUG_CAMERA"  },
        { "type" : "CheckBox", "x" : 80,  "y" : 160, "text" : "Debugging collisions ${DEBUG_COLLISIONS}",  "binding" : "DEBUG_COLLISIONS"  },
        { "type" : "CheckBox", "x" : 80,  "y" : 190, "text" : "Model editing ${MODEL_EDITING}",  "binding" : "MODEL_EDITING"  },
        { "type" : "CheckBox", "x" : 80,  "y" : 220, "text" : "Visualize Triangles ${DEBUG_TRIANGLES}",  "binding" : "DEBUG_TRIANGLES"  },
        { "type" : "Button",   "x" : 380, "y" : 800, "text" : "Back",   "actions" : { "onMouseClicked" : [ "pop" ] } }
      ]
     },

     "game_over" :
     {
      "stage" : "game",
      "controls" : [
        { "type" : "Panel",  "x" : 230, "y" : 100, "w" : 640, "h" : 1024 },
        { "type" : "Label",  "x" : 210, "y" : 130, "text" : "Game Over" },
        { "type" : "ToolButton", "x" :  10, "y" : 800, "icon" : 20, "actions" : { "onMouseClicked" : [ "push:settings" ] } },
        { "type" : "Button", "x" : 190, "y" : 560, "text" : "Play",   "actions" : { "onMouseClicked" : [ "goto:game" ] } }
      ]
     },

     "game_over_old" :
     {
      "stage" : "game",
      "controls" : [
        { "type" : "Panel",  "x" : 230, "y" : 100, "w" : 640, "h" : 1024 },
        { "type" : "Label",  "x" : 210, "y" : 130, "text" : "Game Over" },

        { "type" : "Rectangle", "x" : 65, "y" : 260, "w" : 500, "h" : 50, "r" : 0, "g" : 0, "b" : 255, "a" : 255, "animations" : [
          { "timeScale" :1400, "curve" : "easeOut", "loop" : "no", "parameter" : "x", "t0" : -800, "t1" :  65 },
          { "timeScale" :1400, "curve" : "easeOut", "loop" : "no", "parameter" : "y", "t0" :  200, "t1" : 260 },
          { "timeScale" :1400, "curve" : "easeOut", "loop" : "no", "parameter" : "a", "t0" :    0, "t1" : 255 }
          ] },
        { "type" : "Label",  "x" : 220, "y" : 270, "text" : "Free Gift" },

        { "type" : "Rectangle", "x" : 65, "y" : 330, "w" : 500, "h" : 50, "r" : 255, "g" : 0, "b" : 0, "a" : 255, "animations" : [
          { "timeScale" :1400, "curve" : "square",  "loop" : "no", "parameter" : "g", "t0" :  255, "t1" : 0 }
          ]
        },
        { "type" : "Label",  "x" : 180, "y" : 340, "text" : "Win a Present" },

        { "type" : "Button", "x" : 190, "y" : 560, "text" : "Play",   "actions" : { "onMouseClicked" : [ "goto:character_edit" ] } }
      ]
     }


  }
}