Updated Program (markdown)
@@ -6,7 +6,7 @@ One important note: this is currently in developement, if something doesn't work
|
|||||||
Here is a example of how to create a default program:
|
Here is a example of how to create a default program:
|
||||||
|
|
||||||
````lua
|
````lua
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||||
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
||||||
````
|
````
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Here are all possible functions available for programs. Remember program inherit
|
|||||||
## getStatus
|
## getStatus
|
||||||
Sets the displayed button text
|
Sets the displayed button text
|
||||||
````lua
|
````lua
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||||
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
||||||
NyoUI.debug(aProgram:getStatus()) -- returns "running", "normal", "suspended" or "dead"
|
NyoUI.debug(aProgram:getStatus()) -- returns "running", "normal", "suspended" or "dead"
|
||||||
````
|
````
|
||||||
@@ -27,7 +27,7 @@ NyoUI.debug(aProgram:getStatus()) -- returns "running", "normal", "suspended" or
|
|||||||
## execute
|
## execute
|
||||||
executes the given path (-program)
|
executes the given path (-program)
|
||||||
````lua
|
````lua
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||||
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
||||||
aProgram:execute("rom/programs/fun/worm.lua") -- executes worm, have fuuuuuuuuuuuuuuun - only hard difficulty ok?
|
aProgram:execute("rom/programs/fun/worm.lua") -- executes worm, have fuuuuuuuuuuuuuuun - only hard difficulty ok?
|
||||||
````
|
````
|
||||||
@@ -37,7 +37,7 @@ aProgram:execute("rom/programs/fun/worm.lua") -- executes worm, have fuuuuuuuuuu
|
|||||||
## stop
|
## stop
|
||||||
gives a terminate event to the program, which means if you are running a shell, and the shell executes a program by itself you have to call stop 2 times to entirely close the running program
|
gives a terminate event to the program, which means if you are running a shell, and the shell executes a program by itself you have to call stop 2 times to entirely close the running program
|
||||||
````lua
|
````lua
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||||
local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/shell.lua"):show()
|
local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/shell.lua"):show()
|
||||||
mainFrame:addButton("myFirstButton"):setText("close"):onClick(function() aProgram:stop() end):show()
|
mainFrame:addButton("myFirstButton"):setText("close"):onClick(function() aProgram:stop() end):show()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user