-
-
Notifications
You must be signed in to change notification settings - Fork 19
OSL ‐ Enums
Mistium edited this page Jun 12, 2024
·
13 revisions
This is how you use an enum
enum "states" [
"mainmenu",
"crafting"
]
state = states."mainmenu"
log state
mainloop:
if state == states."mainmenu" (
//mainmenu code
)
if state == states."crafting" (
//crafting code
)
import "win-buttons"
equivalent with array
states = [
"mainmenu",
"crafting"
]
state = states.[1]
mainloop:
if state == states.[1] (
// mainmmenu code
)
if state == states.[2] (
// crafting code
)
equivalent with object
states = {
"mainmenu":"1",
"crafting":"2"
}
state = states.mainmenu
mainloop:
if state == states.mainmenu (
// mainmmenu code
)
if state == states.crafting (
// crafting code
)
originOS is a web desktop gui with a self contained file system, programming languages, internet system and a whole lot of stuff an os should be able to do Use originOS here