mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2024-12-26 04:08:21 +01:00
add start/stop buttons
This commit is contained in:
parent
5e4aa7b1d4
commit
8288379482
@ -5,6 +5,8 @@
|
|||||||
<afx-vbox>
|
<afx-vbox>
|
||||||
<afx-hbox data-height="20" data-id="bottom-vbox">
|
<afx-hbox data-height="20" data-id="bottom-vbox">
|
||||||
<afx-button data-id = "log-clear" data-width="25" iconclass="fa fa-trash"></afx-button>
|
<afx-button data-id = "log-clear" data-width="25" iconclass="fa fa-trash"></afx-button>
|
||||||
|
<afx-button data-id = "code-run" data-width="25" iconclass="fa fa-play"></afx-button>
|
||||||
|
<afx-button data-id = "code-stop" data-width="25" iconclass="fa fa-stop"></afx-button>
|
||||||
</afx-hbox>
|
</afx-hbox>
|
||||||
<div data-id="output"></div>
|
<div data-id="output"></div>
|
||||||
</afx-vbox>
|
</afx-vbox>
|
||||||
|
@ -223,6 +223,14 @@
|
|||||||
(this.find("log-clear")).set("onbtclick", function(e) {
|
(this.find("log-clear")).set("onbtclick", function(e) {
|
||||||
return me.log("clean");
|
return me.log("clean");
|
||||||
});
|
});
|
||||||
|
(this.find("code-run")).set("onbtclick", function(e) {
|
||||||
|
return me.run();
|
||||||
|
});
|
||||||
|
(this.find("code-stop")).set("onbtclick", function(e) {
|
||||||
|
if (me.socket) {
|
||||||
|
return me.socket.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
this.socket = null;
|
this.socket = null;
|
||||||
return this.bindKey("CTRL-R", function() {
|
return this.bindKey("CTRL-R", function() {
|
||||||
return me.run();
|
return me.run();
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<afx-vbox>
|
<afx-vbox>
|
||||||
<afx-hbox data-height="20" data-id="bottom-vbox">
|
<afx-hbox data-height="20" data-id="bottom-vbox">
|
||||||
<afx-button data-id = "log-clear" data-width="25" iconclass="fa fa-trash"></afx-button>
|
<afx-button data-id = "log-clear" data-width="25" iconclass="fa fa-trash"></afx-button>
|
||||||
|
<afx-button data-id = "code-run" data-width="25" iconclass="fa fa-play"></afx-button>
|
||||||
|
<afx-button data-id = "code-stop" data-width="25" iconclass="fa fa-stop"></afx-button>
|
||||||
</afx-hbox>
|
</afx-hbox>
|
||||||
<div data-id="output"></div>
|
<div data-id="output"></div>
|
||||||
</afx-vbox>
|
</afx-vbox>
|
||||||
|
@ -163,6 +163,12 @@ class LuaPlayground extends this.OS.GUI.BaseApplication
|
|||||||
me.editor.resize()
|
me.editor.resize()
|
||||||
(@find "log-clear").set "onbtclick", (e) ->
|
(@find "log-clear").set "onbtclick", (e) ->
|
||||||
me.log "clean"
|
me.log "clean"
|
||||||
|
(@find "code-run").set "onbtclick", (e) ->
|
||||||
|
me.run()
|
||||||
|
|
||||||
|
(@find "code-stop").set "onbtclick", (e) ->
|
||||||
|
me.socket.close() if me.socket
|
||||||
|
|
||||||
@socket = null
|
@socket = null
|
||||||
@bindKey "CTRL-R", () -> me.run()
|
@bindKey "CTRL-R", () -> me.run()
|
||||||
menu: () ->
|
menu: () ->
|
||||||
|
Loading…
Reference in New Issue
Block a user