File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
advanced-presets/templates Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11export class { { CLASS_NAME } } {
2- public containerWidget : mod . UIWidget = null ;
3- public textWidget: mod . UIWidget = null ;
2+ public containerWidget : mod . UIWidget | undefined ;
3+ public textWidget: mod . UIWidget | undefined ;
44
55 private counterValue = 0 ;
66
7- public create ( ) : mod . UIWidget {
7+ public create ( owner : mod . Player | mod . Team | null = null ) : void {
88 this. counterValue = 0 ;
99 this . containerWidget = modlib . ParseUI (
1010{ { UI_PARAMS } }
1111 ) ;
1212 this . textWidget = mod . FindUIWidgetWithName ( 'CounterText' ) ;
1313 this . refreshUi ( ) ;
14- return this . containerWidget ;
1514 }
1615
1716 public increment ( ) : number {
@@ -26,13 +25,14 @@ export class {{CLASS_NAME}} {
2625 return this . counterValue ;
2726 }
2827
29- pulic destroy ( ) {
28+ public destroy ( ) {
3029 if ( this . containerWidget ) {
3130 mod . DeleteUIWidget ( this . containerWidget ) ;
3231 }
3332 }
3433
3534 private refreshUi ( ) : void {
35+ if ( ! this . textWidget ) return ;
3636 mod . SetUITextLabel ( this . textWidget , mod . Message ( this . counterValue . toString ( ) ) ) ;
3737 }
3838
Original file line number Diff line number Diff line change 11< header class ="header-bar ">
22 < div class ="header-main ">
33 < div class ="brand ">
4- < span class ="brand__title "> UI Builder V1.4.0 </ span >
4+ < span class ="brand__title "> UI Builder V1.4.1 </ span >
55 < span class ="brand__subtitle "> Battlefield Portal</ span >
66 </ div >
77
You can’t perform that action at this time.
0 commit comments