-
Notifications
You must be signed in to change notification settings - Fork 1
NanoSDK
NanoSDK is the software that allows you to create MicroOS applications locally using the NanoCode App built into every MicroOS installation. In this guide you'll learn about different commands, basic and advanced logic, compiling, different optimizations as well as see some example apps made with NanoSDK.
The commands and their parameters are listed with a darker background, with a full version of their name written in bold letters right next to them.
Whenever a number parameter is used the number has to be at least 3 characters long. If it does not meet that requirement, add 0's at the beggining of the number until it is 3 characters long.
Basic commands are the bare bone features of NanoSDK, often required for the app to function.
DAN [name] Define Application Name - Defines the application name listed in the library and title bar, has to be put in the first line.
DAI [asset name] Define Application Icon - Defines the application icon displayed in the library, has to be put in the second line. In case of not having an icon asset the name can be set to default in order to use the default MicroOS application icon.
ASM [name] Application Submenu - Defines the application submenu, the uses of this command are explained in Advanced Logic. An app cannot function without the submenu being defined in the third line.
PRN [string] Print - Displays a pop up window with the inputed string.
END [error] End - Force closes the application. An optional error message can be added.
Basic logic mostly revolves around a singular command, IFB [action] [type] [value] [aditional] If Bracket. This command has many sub commands called actions, which will be described below.
IFB var [variable name] [comparison type] [comparison value] If Bracket Variable - This command triggers the code found inside the if bracket if the specified condition is met. There are different comparison types which all do different things. There is eql for equals, this will trigger the code if the variable is equal to the specified value, this is the only comparison type that works with strings. There is mor for more, this will trigger the code if the variable is higher than the specified value. There is les for less, this will trigger the code if the variable is less than the specified value. There is moe for more or equal, this will trigger the code if the variable is equal or higher than the specified value. And at last there is loe for less or equal, this will trigger the code if the variable is equal or less than the specified value.
IFB btn [button state] [button] If Bracket Button - This command will run the code inside the if bracket only if the set button condition is met. The button conditions include dwn for the button currently being held down and ndn for the button not currently being held down. The avaiable buttons are btna for the A button, btnb for the B button, dpdl for DPAD Left, dpdr for DPAD Right, dpdu for DPAD Up and dpdd for DPAD Down.
IFB spr [variable] [comparison type] [comparison value] If Bracket Sprite - This command works just like the IFB var command except instead of variables it gets sprite data. The avaiable data is psx for the X position, psy for the Y position, psz for the Z position, vsb for the sprite's visibility. The comparison type parameter also includes an exclusive type, tch for touch. When using it set the value to the name of the sprite you want to check if the first sprite is touching.
IFB end If bracket end - This command defines the end of the If Bracket, making any code after it be unaffected by the condition.
Another type of command which falls under Basic Logic is LOP [amount/parameter] Loop. This command will repeat all the code inside its bracket the specified amount of times. The different parameters are described below.
LOP [number] **Loop** - This command is the beginning of the loop, you can set the number to either a number of your choice or inf``` if you want the loop to never end unless specified.
LOP EXT Loop Exit - This command escapes the loop its in, this is useful when using the LOP inf loop.
LOP end Loop End - This command closes off the loop, making all the code writen after it not be ran as part of the loop.
Work in progress
Work in progress
Work in progress
Work in progress
Work in progress
Work in progress
Work in progress
Work in progress
This is an example of a simple app featuring a List GUI.
DAN example
DAI default
ASM home
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str3
option1
option2
option3
LOP inf
IFB var ASM eql home
WHN sel 001 name
DLG name
ASM menu1
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str1
back
WHN sel 002 name
DLG name
ASM menu2
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str1
back
WHN sel 003 name
DLG name
ASM menu3
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str1
back
WHN end
IFB els
WHN sel 001 name
ASM home
CLG name
LGD 160 100 name
LGP 080 060 name
LGS true
LGO str3
option1
option2
option3
WHN end
IFB end
LOP end