This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local items = | |
| { | |
| { type = "image", value = { filename = "Icon.png", baseDir = system.ResourceDirectory, } }, | |
| { type = "string", value = "Hello, World" }, | |
| { type = "url", value = "http://www.coronalabs.com" }, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| settings = | |
| { | |
| plugins = | |
| { | |
| ["CoronaProvider.native.popup.activity"] = | |
| { | |
| publisherId = "com.coronalabs", | |
| supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, | |
| }, | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Windows; | |
| using System.Windows.Controls; | |
| using System.Windows.Navigation; | |
| using Microsoft.Phone.Controls; | |
| using Microsoft.Phone.Shell; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string username = string.Empty; | |
| var boxedUsername = e.Properties.Get("username") as CoronaLabs.Corona.WinRT.CoronaBoxedString; | |
| if (boxedUsername != null) | |
| { | |
| username = boxedUsername.ToString(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void OnCoronaRuntimeLoaded( | |
| object sender, CoronaLabs.Corona.WinRT.CoronaRuntimeEventArgs e) | |
| { | |
| // Keep a reference to the Corona runtime environment. | |
| // It's needed so that your login window's results can be dispatched to Corona. | |
| fCoronaRuntimeEnvironment = e.CoronaRuntimeEnvironment; | |
| fCoronaRuntimeEnvironment.AddEventListener("requestingLogin", OnRequestingLogin); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fCoronaPanel.Runtime.Loaded += OnCoronaRuntimeLoaded; | |
| fCoronaPanel.Runtime.Terminating += OnCoronaRuntimeExiting; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Windows; | |
| using System.Windows.Controls; | |
| using System.Windows.Navigation; | |
| using Microsoft.Phone.Controls; | |
| using Microsoft.Phone.Shell; | |
| using TextTutorial.Resources; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- Abstract: Hello World sample app. | |
| -- | |
| -- Version: 1.2 | |
| -- | |
| -- Sample code is MIT licensed | |
| -- Copyright (C) 2014 Corona Labs Inc. All Rights Reserved. | |
| -- | |
| -- Supports Graphics 2.0 | |
| ------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| math.randomseed( os.time() ) | |
| local function rollDice( dicePattern ) | |
| -- Dice pattern 3d6+3k3 | |
| -- First number : number of dice | |
| -- d : required string | |
| -- Second number : sides to the dice | |
| -- +/- : optional modifier | |
| -- ^/k : optional string; '^' keeps the high values, 'k' keeps the low values | |
| -- Third number : number of dice to keep, i.e. 4d6^3 keeps the best three numbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local widget = require( "widget" ) | |
| local myList | |
| local myData = {} | |
| myData[1] = { name="Fred", phone="555-555-1234" } | |
| myData[2] = { name="Barney", phone="555-555-1235" } | |
| myData[3] = { name="Wilma", phone="555-555-1236" } | |
| myData[4] = { name="Betty", phone="555-555-1237" } | |
| myData[5] = { name="Pebbles", phone="555-555-1238" } | |
| myData[6] = { name="BamBam", phone="555-555-1239" } |