Use right-click for helpers
This commit is contained in:
parent
8189d51912
commit
b844cbbc17
@ -27,6 +27,10 @@ npm start
|
|||||||
|
|
||||||
<img src='https://raw.githubusercontent.com/hundredrabbits/Ronin/master/PREVIEW.jpg' width='600'/>
|
<img src='https://raw.githubusercontent.com/hundredrabbits/Ronin/master/PREVIEW.jpg' width='600'/>
|
||||||
|
|
||||||
|
## Buttons
|
||||||
|
|
||||||
|
- Holding right-click while using $helpers will run the script as the mouse is used.
|
||||||
|
|
||||||
## Library
|
## Library
|
||||||
|
|
||||||
Additional functions can be found in the [includes](https://github.com/hundredrabbits/Ronin/tree/master/desktop/sources/lisp), you can also look at the [examples](https://github.com/hundredrabbits/Ronin/tree/master/examples) to see them in action.
|
Additional functions can be found in the [includes](https://github.com/hundredrabbits/Ronin/tree/master/desktop/sources/lisp), you can also look at the [examples](https://github.com/hundredrabbits/Ronin/tree/master/examples) to see them in action.
|
||||||
|
@ -119,7 +119,7 @@ function Commander (ronin) {
|
|||||||
this._input.value = this._input.value.replace('$path', `"${path}"`)
|
this._input.value = this._input.value.replace('$path', `"${path}"`)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.commit = function (shape, end = false) {
|
this.commit = function (shape, end = false, run = false) {
|
||||||
if (this.cache.indexOf('$') < 0) { return }
|
if (this.cache.indexOf('$') < 0) { return }
|
||||||
const segs = this.cache.split('$')
|
const segs = this.cache.split('$')
|
||||||
const seg = segs[1]
|
const seg = segs[1]
|
||||||
@ -144,8 +144,10 @@ function Commander (ronin) {
|
|||||||
if (end === true) {
|
if (end === true) {
|
||||||
this.cache = this._input.value
|
this.cache = this._input.value
|
||||||
}
|
}
|
||||||
|
if (run === true) {
|
||||||
this.run()
|
this.run()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Display
|
// Display
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ function Ronin () {
|
|||||||
this.bindings[id](shape)
|
this.bindings[id](shape)
|
||||||
}
|
}
|
||||||
if (this.mouseOrigin) {
|
if (this.mouseOrigin) {
|
||||||
this.commander.commit(shape, false)
|
this.commander.commit(shape, false, e.which !== 1)
|
||||||
this.surface.clearGuide()
|
this.surface.clearGuide()
|
||||||
this.surface.drawGuide(shape)
|
this.surface.drawGuide(shape)
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ function Ronin () {
|
|||||||
this.bindings[id](shape)
|
this.bindings[id](shape)
|
||||||
}
|
}
|
||||||
if (this.mouseOrigin) {
|
if (this.mouseOrigin) {
|
||||||
this.commander.commit(shape, true)
|
this.commander.commit(shape, true, e.which !== 1)
|
||||||
}
|
}
|
||||||
this.mouseOrigin = null
|
this.mouseOrigin = null
|
||||||
this.surface.clearGuide()
|
this.surface.clearGuide()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user