Ver Fonte

Action.Async now defaults to true only on desktop targets.

Mark Sibly há 8 anos atrás
pai
commit
3bae73fa02
1 ficheiros alterados com 8 adições e 8 exclusões
  1. 8 8
      modules/mojox/action.monkey2

+ 8 - 8
modules/mojox/action.monkey2

@@ -84,7 +84,10 @@ Class Action
 	
 	
 	Setter( async:Bool )
 	Setter( async:Bool )
 
 
+#If Not __WEB_TARGET__
 		_async=async
 		_async=async
+#endif
+
 	End
 	End
 	
 	
 	#rem monkeydoc Hotkey for the action.
 	#rem monkeydoc Hotkey for the action.
@@ -133,19 +136,12 @@ Class Action
 	#rem monkeydoc Triggers the action.
 	#rem monkeydoc Triggers the action.
 	#end	
 	#end	
 	Method Trigger()
 	Method Trigger()
-	
-#if __TARGET__<>"emscripten"
-	
+		
 		If _async
 		If _async
 			New Fiber( Triggered )
 			New Fiber( Triggered )
 		Else
 		Else
 			Triggered()
 			Triggered()
 		Endif
 		Endif
-
-#else
-
-		Triggered()
-#endif
 		
 		
 	End
 	End
 	
 	
@@ -156,7 +152,11 @@ Class Action
 	Field _icon:Image
 	Field _icon:Image
 	Field _hotKey:Key
 	Field _hotKey:Key
 	Field _hotKeyMods:Modifier
 	Field _hotKeyMods:Modifier
+#If __DESKTOP_TARGET__
 	Field _async:Bool=True
 	Field _async:Bool=True
+#Else
+	Field _async:Bool=False
+#Endif
 	
 	
 	Global _hotKeys:Map<Key,Stack<Action>>
 	Global _hotKeys:Map<Key,Stack<Action>>