@@ -109,8 +109,9 @@ game.createClass('Loader', 'Scene', {
109
109
}
110
110
111
111
if ( game . Loader . text ) {
112
- this . loaderText = new game . SystemText ( game . Loader . text , { size : 14 / game . scale , align : 'center' , color : game . Loader . textColor } ) ;
113
- this . loaderText . position . set ( game . width / 2 , game . height - size / game . scale ) ;
112
+ var size = game . Loader . textSize / game . scale ;
113
+ this . loaderText = new game . SystemText ( game . Loader . text , { size : size , align : 'center' , color : game . Loader . textColor , baseline : 'bottom' } ) ;
114
+ this . loaderText . position . set ( game . width / 2 , game . height - size - 8 ) ;
114
115
this . loaderText . addTo ( this . stage ) ;
115
116
}
116
117
@@ -445,7 +446,7 @@ game.createClass('Loader', 'Scene', {
445
446
}
446
447
447
448
var waitTime = game . Loader . minTime - ( game . Timer . time - this . _startTime ) ;
448
- if ( waitTime > 0 ) game . Timer . add ( waitTime , this . onComplete . bind ( this ) ) ;
449
+ if ( waitTime > 0 && this . scene ) game . Timer . add ( waitTime , this . onComplete . bind ( this ) ) ;
449
450
else this . onComplete ( ) ;
450
451
} ,
451
452
@@ -590,7 +591,7 @@ game.addAttributes('Loader', {
590
591
**/
591
592
showPercent : true ,
592
593
/**
593
- Text to show on bottom of the loader
594
+ Text to show on bottom of the loader.
594
595
@attribute {String} text
595
596
@default 'Made with Panda 2 - www.panda2.io'
596
597
**/
@@ -600,7 +601,13 @@ game.addAttributes('Loader', {
600
601
@attribute {String} textColor
601
602
@default #fff
602
603
**/
603
- textColor : '#fff'
604
+ textColor : '#fff' ,
605
+ /**
606
+ Size of bottom loader text.
607
+ @attribute {String} textSize
608
+ @default 14
609
+ **/
610
+ textSize : 14
604
611
} ) ;
605
612
606
613
} ) ;
0 commit comments