Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
import mnit
-class MyApp
- super App
+redef class App
var img : nullable I = null
- init do super
-
- redef fun init_window
+ redef fun window_created
do
super
end
end
end
-
-var app = new MyApp
-app.main_loop
-
import android.widget.Toast;
`}
-redef class MyApp
+redef class App
redef fun input( ie )
do
if ie isa PointerEvent and ie.depressed then do_java_stuff
// - Context needed from now on
// NativeActivity is a Java sub-class of Context
- final android.app.NativeActivity context = MyApp_native_activity(recv);
+ final android.app.NativeActivity context = App_native_activity(recv);
// Vibration
android.os.Vibrator v = (android.os.Vibrator)
super
- init_window
+ window_created
end
redef fun generate_input