File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed
Examples/Content/Scripts/2048/game Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -2,28 +2,21 @@ module.exports = function (widget,vbox) {
22 "use strict" ;
33
44 var instantiate = require ( 'instantiator' )
5+ var UMG = require ( 'UMG' )
56
67 function test ( ) {
7- var design = {
8- id : 'button' ,
9- type : Button ,
10- children : [
11- {
12- type : TextBlock ,
13- attrs : {
14- Text : 'Reset'
15- }
16- }
17- ]
18- }
8+ var design =
9+ UMG ( Button , { id :'button' } ,
10+ UMG . text ( { } , 'Reset' )
11+ )
1912
2013 var widget = instantiate ( design )
2114 vbox . AddChild ( widget )
2215 return widget
2316 }
2417
2518 var layout = test ( )
26- var reset_button = Button . C ( layout . find ( 'button' ) )
19+ var reset_button = Button ( layout . find ( 'button' ) )
2720
2821 function KeyboardInputManager ( ) {
2922 this . events = { } ;
@@ -63,16 +56,16 @@ module.exports = function (widget,vbox) {
6356 'Right' : ( ) => this . emit ( "move" , 3 )
6457 }
6558
66- UserWidget . C ( widget . proxy ) . OnKeyDown = ( geom , keyevent ) => {
59+ widget . proxy . OnKeyDown = ( geom , keyevent ) => {
6760 var key = KismetInputLibrary . prototype . GetKey ( keyevent ) . KeyName
6861
6962 var op = map [ key ]
7063 if ( op != undefined ) {
7164 op ( )
72- return WidgetBlueprintLibrary . Handled ( )
65+ return Reply . Handled ( )
7366 }
7467 else {
75- return WidgetBlueprintLibrary . Unhandled ( )
68+ return Reply . Unhandled ( )
7669 }
7770 }
7871
You can’t perform that action at this time.
0 commit comments