visual-js
Version:
[3.0.26] Prepare for npm usage. Special integration for matrix engine 1.9.0 Thunder.
37 lines (29 loc) • 748 B
JavaScript
import {CONVERTOR} from "../init";
import { DIMENSION } from "../math";
import SYS from '../system';
// WEB GUI
export function RIGHT_MENU_BUTTON(text, Y_OFFSET, id, res) {
var ROOT = this;
this.IAM = id;
this.HOVER = false;
this.Y_OFFSET = Y_OFFSET;
this.text = text;
this.icon = null;
if (typeof res != "undefined") {
var locName = "system_" + this.IAM.toString();
SYS.RES.CREATE_IMG(locName, res);
this.icon = true;
}
(this.POSITION = {
x: 0,
y: 0,
X: function () {
return ROOT.POSITION.x;
},
Y: function () {
return ROOT.POSITION.y + ROOT.Y_OFFSET;
},
}),
(this.DIMENSION = new DIMENSION(22, 2));
this.TAP = function () {};
}