Problem with gauge

PHP:
var g = new Window_Base;
g.drawGauge(10,10,600,0.5,'red','red');
Why it's not working where is my gauge? :hswt2:
1. You need to call Window_Base as a constructor, which means giving it the arguments of x, y, width, height inside parentheses.

2. You need to add the window to the current scene
1. You need to call Window_Base as a constructor, which means giving it the arguments of x, y, width, height inside parentheses.

2. You need to add the window to the current scene

PHP:
var myGauge = new Window_Base;
var scene = SceneManager._scene;
myGauge.initialize(10,10,600,100);
scene.addChild(myGauge);
myGauge.drawGauge(10,10,600,0.5,'red','red');
Ok now it works!

Ao3BncZ.png


But I don't need that window background.
And I don't understand how to set the gauge height.
What should I do? :hswt:
You can set the opacity of the window to 0 to hide it.
To increase the gauge height you would have to overwrite Window_Base.prototype.drawGauge to allow a variable height because it's currently hard-coded as 6. Better to overwrite it as a plugin rather than edit the core script directly.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-gauge.95353/