I'm trying to make a gauge for a set variable. I think the normal gauges are hardcoded into rpg maker. Is there a way to replicate it to be used in a plugin? Using Visual Studio and the plugin I'm trying to make is for MZ specifically. This is my code currently:
JavaScript:
(function () {
var params = PluginManager.parameters("PB_Sync_Mechanic")
var number = params["Sync Level Minimum"];
var number = params["Sync Level Maximum"];
})();
function Scene_Sync() {
this.initialize();
}
Scene_Sync.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Sync.prototype.constructor = Scene_Sync;
Scene_Sync.prototype.initialize = function () {
Scene_MenuBase.prototype.initialize.call(this);
};
//Creates First Window
Scene_Sync.prototype.create = function () {
Scene_MenuBase.prototype.create.call(this);
this._customWindow = new Window_Custom(0, 25, 320, 240);
this.addWindow(this._customWindow);
}
//Update
Scene_Sync.prototype.update = function () {
if (!this.drawnWindows) {
this._customWindow.drawAllItems();
this.drawnWindows = true;
}
}
//Draws Window
function Window_Custom() {
this.initialize.apply(this, arguments);
}
Window_Custom.prototype = Object.create(Window_Base.prototype);
Window_Custom.prototype.contructor = Window_Custom;
Window_Custom.prototype.initialize = function (x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.drawAllItems();
}
//Writes Text
Window_Custom.prototype.drawAllItems = function () {
this.drawText($gameVariables.value(130), 0, 0, this.width - this.padding * 2, "center");
this.drawFace("Telos", 5, 96, 48, 148, 148);
};