Mark Sibly 9 vuotta sitten
vanhempi
commit
9f202f3834

+ 6 - 0
modules/emscripten/docs/module.md

@@ -0,0 +1,6 @@
+
+# The emscripten module
+
+The emscripten module provides a monkey2 wrapper for the emscripten.h include file.
+
+More information about emscripten can be found at <a href=http://kripken.github.io/emscripten-site/ target=blank>http://kripken.github.io/emscripten-site/</a>

+ 6 - 0
modules/freetype/docs/module.md

@@ -0,0 +1,6 @@
+
+# The freetype module
+
+Freetype is an open source library for rendering fonts.
+
+More information about freetype is available at <a href=https://www.freetype.org/ target=blank>https://www.freetype.org/</a>.

+ 8 - 0
modules/gles20/docs/module.md

@@ -0,0 +1,8 @@
+
+# The gles20 module
+
+The gles20 module provides a monkey2 wrapper for the OpenGL ES2.0 API.
+
+The OpenGL ES2.0 reference pages can be viewed at <a href=https://www.khronos.org/opengles/sdk/docs/man/ target=blank>https://www.khronos.org/opengles/sdk/docs/man/</a>.
+
+

+ 6 - 0
modules/hoedown/docs/module.md

@@ -0,0 +1,6 @@
+
+# The hoedown module
+
+Hoedown is an open source library for converting markdown to html.
+
+More information about hoedown can be found at <a href=https://github.com/hoedown/hoedown target=blank>https://github.com/hoedown/hoedown</a>.

+ 4 - 0
modules/libc/docs/module.md

@@ -0,0 +1,4 @@
+
+# The libc module
+
+The libc module contains wrappers for a number 'C' library functions and types.

+ 7 - 0
modules/litehtml/docs/module.md

@@ -0,0 +1,7 @@
+
+# The litehtml module
+
+Litehtml is an open source library for rendering html and css.
+
+More information about litehtml can be found at <a href=http://www.litehtml.com/ target=blank>http://www.litehtml.com/</a>.
+

+ 6 - 0
modules/miniz/docs/module.md

@@ -0,0 +1,6 @@
+
+# The miniz module
+
+Miniz is an open source library for reading and writing zip files.
+
+More information about miniz can be found at <a href=https://code.google.com/archive/p/miniz/ target=blank>https://code.google.com/archive/p/miniz/</a>.

+ 81 - 0
modules/mojo/docs/module.md

@@ -0,0 +1,81 @@
+
+# The mojo module
+
+The mojo module provides a simple cross platform application framework for writing games and other graphical apps.
+
+
+## Initialization and the event loop
+
+To initialize mojo, you need to do at least 3 things:
+
+* Create an [[app.AppInstance]] using 'New AppInstance'. This will automatically initialize the [[app.App]] global variable.
+
+* Create a [[app.Window]]. You will generally create a subclass of window you have defined yourself, eg: 'New MyWindow'.
+
+* Start the app using App.Run().
+
+This can all be done inside Main().
+
+
+Once the app is running, mojo runs a simple event loop that looks like this:
+
+* Get OS events and dispatch corresponding mojo events if necessary.
+
+* Once there are no OS events left to process, any custom [[app.AppInstance.Idle]] handlers are called.
+
+* If the application has called [[app.AppInstance.RequestRender]], then the app is rendered.
+
+The app will continue executing the event loop until [[app.AppInstance.Terminate]] is called.
+
+
+## Subclassing Window
+
+Subclassing the app Window class is easy - just extend the [[app.Window]] class.
+
+To render to the window, you will also need to override the [[app.Window.OnRender]] method. 
+
+The OnRender method is called when the app needs to be rendered, and is passed a [[graphics.Canvas]] instance for window rendering code to use.
+
+In addition, you may also want to override the [[app.Window.OnWindowEvent]] method to handle window close, resize etc events.
+
+
+## Handling user input
+
+There are 2 main ways to handle user input, via the [[app.View.OnKeyEvent]] and [[app.View.OnMouseEvent]] event handlers or using the
+[[input.Keyboard]] and [[input.Mouse]] devices.
+
+Key and mouse events are sent to your app as soon they are processed by the event loop, while the keyboard and mouse devices may be 'polled' at
+any time.
+
+
+## A minimal app
+
+Ok, time to put it all together!
+
+@example
+
+#Import "<std>"
+#Import "<mojo>"
+
+Using std..
+Using mojo..
+
+Class MyWindow Extends Windows
+
+	Method OnRender( canvas:Canvas ) Override
+
+		canvas.DrawText( "Hello World",Width/2,Height/2,.5,.5 )
+	End
+	
+End
+
+Function Main()
+
+	New AppInstance
+	
+	New MyWindow
+	
+	App.Run()
+End
+
+@end

+ 7 - 0
modules/monkey/docs/module.md

@@ -0,0 +1,7 @@
+
+# The monkey module
+
+The monkey module provides core functionality required by all monkey apps.
+
+You don't need to #import the monkey module - this is done for automatically by the monkey2 compiler.
+

+ 6 - 0
modules/sdl2-mixer/docs/module.md

@@ -0,0 +1,6 @@
+
+# The sdl2-mixer module.
+
+SDL\_mixer is a sample multi-channel audio mixer library. 
+
+More information about SDL\_mixer can be found at <a href=https://www.libsdl.org/projects/SDL_mixer/ target=blank>https://www.libsdl.org/projects/SDL_mixer/</a>.

+ 7 - 0
modules/sdl2/docs/module.md

@@ -0,0 +1,7 @@
+
+# The sdl2 module
+
+Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick,
+and graphics hardware via OpenGL and Direct3D.
+
+More information about SDL can be found at <a href=https://www.libsdl.org/ target=blank>https://www.libsdl.org/</a>.

+ 6 - 0
modules/stb-image/docs/module.md

@@ -0,0 +1,6 @@
+
+# The stb-image module
+
+stb-image is an open source library for loading image files.
+
+More information about stb-image can be found at <a href=https://github.com/nothings/stb>https://github.com/nothings/stb/</a>.

+ 6 - 0
modules/stb-truetype/docs/module.md

@@ -0,0 +1,6 @@
+
+# The stb-truetype module
+
+stb-truetype is an open source library for rendering true type fonts.
+
+More information about stb-truetype can be found at <a href=https://github.com/nothings/stb>https://github.com/nothings/stb/</a>.

+ 4 - 0
modules/std/docs/module.md

@@ -0,0 +1,4 @@
+
+# The std module
+
+The std module contains utility classes and functions that are useful for a wide range of programming purposes.