官术网_书友最值得收藏!

Time for action – modifying our application

Before we dive into more complex examples, let's alter some minor things in our program by performing the following steps:

  1. Let's alter the second line of main.lua to display as follows:
    textObject = display.newText( "Hello World!", 160, 80, native.systemFont, 36 )
    textObject:setFillColor( 0.9, 0.98 ,0 )
  2. Save your file and go back to the Corona simulator. The simulator will detect a change from your file and automatically relaunch with the changes. If the simulator doesn't relaunch automatically upon saving your file, press Command + R (Mac) / Ctrl + R (Windows). You will see the following output on the screen:
    Time for action – modifying our application

Note

As you continue learning more Corona functions, you'll notice that some of the text values will be optional. In this case, we need to use five values.

主站蜘蛛池模板: 千阳县| 吉木乃县| 堆龙德庆县| 门源| 海盐县| 青神县| 永春县| 武平县| 万载县| 兴安县| 北碚区| 灌阳县| 九龙坡区| 五华县| 咸宁市| 清流县| 长海县| 阿克陶县| 靖边县| 陇南市| 玛多县| 唐山市| 嘉峪关市| 大渡口区| 大庆市| 马公市| 商城县| 津南区| 金沙县| 军事| 渝北区| 东城区| 枣庄市| 德格县| 阿荣旗| 四会市| 全南县| 东兴市| 自贡市| 开江县| 酒泉市|