# limitations under the License.
# Very simple application
-module simple
+module simple is
+ app_name("mnit Simple example") # On Android, this name is hidden by the value in `res/values/strings.xml`
+ app_version(0, 2, git_revision)
+end
import mnit
-class MyApp
- super App
+redef class App
var img : nullable I = null
- init do super
-
- redef fun init_window
+ redef fun on_create
do
super
img = load_image( "fighter.png" )
end
- var r: Float = 0.0
- var g: Float = 0.0
- var b: Float = 0.0
+ var r = 0.0 is writable
+ var g = 0.0 is writable
+ var b = 0.0 is writable
redef fun frame_core( display )
do
b = b + 0.01
end
end
end
-
-var app = new MyApp
-app.main_loop
-