既出もしくはスレッド違いでしたら申し訳ありません。
tomoaky様「TMTrunkGauge」
https://plugin.fungamemake.com/archives/2381
上記のプラグインを導入したのはいいのですが、元々の仕様としてゲージが真ん中から左右に広がっていくのが気になり、普通に左から右へと増えるようにできないかと無知ながらjsファイルのあちこちを弄ってみたのですがどうしても変更ができません。
どうかプラグインに詳しい御方にどこをどう修正すればよいのかをお教え頂ければと存じます。
【解決済】tomoaky様の「TMTrunkGauge」について
【解決済】tomoaky様の「TMTrunkGauge」について
最後に編集したユーザー 白白白 [ 2024年3月02日(土) 00:39 ], 累計 1 回
Re: tomoaky様の「TMTrunkGauge」について
追記を失礼致します。
状況が分かりにくかったと思い、画像を添付させて頂きました。
画像のように、なぜかバーの中心から左右に広がっていってしまいます。これを普通に左端から右端へとゲージが増えるようにしたいということです。
もし、仕様として変更は難しいもしくは不可能だという場合も教えて頂けると幸いです。
状況が分かりにくかったと思い、画像を添付させて頂きました。
画像のように、なぜかバーの中心から左右に広がっていってしまいます。これを普通に左端から右端へとゲージが増えるようにしたいということです。
もし、仕様として変更は難しいもしくは不可能だという場合も教えて頂けると幸いです。
最後に編集したユーザー 白白白 [ 2024年3月01日(金) 22:45 ], 累計 1 回
Re: tomoaky様の「TMTrunkGauge」について
プラグイン内の355行目
this.bitmap.fillRect((this.width / 2) - width / 2, 2, width, this.height - 4, color);
これを
this.bitmap.fillRect(2, 2, width, this.height - 4, color);
こうでいけました。
this.bitmap.fillRect((this.width / 2) - width / 2, 2, width, this.height - 4, color);
これを
this.bitmap.fillRect(2, 2, width, this.height - 4, color);
こうでいけました。
Re: tomoaky様の「TMTrunkGauge」について
ご返信を頂きありがとうございます。
教わる身で恐れ多いのですが...
this.bitmap.fillRect((this.width / 2) - width / 2, 2, width, this.height - 4, color);
上記を、
this.bitmap.fillRect(2, 2, width, this.height - 4, color);
に書き換えても変わらず、
this.bitmap.fillRoundRect((this.width / 2) - width / 2, 2, width, this.height - 4, 3, color);
少し上の上記の部分を書き換えるとゲージの動きが左から右になりました。
ただ、書き換えたことによってゲージから丸みがなくなり、角ばった形になってしまったのですが、丸みを持たせたままにはできないでしょうか...?
教わる身で恐れ多いのですが...
this.bitmap.fillRect((this.width / 2) - width / 2, 2, width, this.height - 4, color);
上記を、
this.bitmap.fillRect(2, 2, width, this.height - 4, color);
に書き換えても変わらず、
this.bitmap.fillRoundRect((this.width / 2) - width / 2, 2, width, this.height - 4, 3, color);
少し上の上記の部分を書き換えるとゲージの動きが左から右になりました。
ただ、書き換えたことによってゲージから丸みがなくなり、角ばった形になってしまったのですが、丸みを持たせたままにはできないでしょうか...?
Re: tomoaky様の「TMTrunkGauge」について
TMBitmapExを導入してたのですね
this.bitmap.fillRoundRect((this.width / 2) - width / 2, 2, width, this.height - 4, 3, color);
↑ここ
この部分(最初は3)が角の丸み部分を決めてる部分ですので、
この数字を適当に大きくしてみてください
もしfillRoundRectの部分をfillRectと書き換えてしまったのでしたら
348~350行目を
this.bitmap.fillRoundRect(0, 0, this.width, this.height, 3, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRoundRect((2, 2, width, this.height - 4, 3, color);
このようにしてください
this.bitmap.fillRoundRect((this.width / 2) - width / 2, 2, width, this.height - 4, 3, color);
↑ここ
この部分(最初は3)が角の丸み部分を決めてる部分ですので、
この数字を適当に大きくしてみてください
もしfillRoundRectの部分をfillRectと書き換えてしまったのでしたら
348~350行目を
this.bitmap.fillRoundRect(0, 0, this.width, this.height, 3, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRoundRect((2, 2, width, this.height - 4, 3, color);
このようにしてください
Re: tomoaky様の「TMTrunkGauge」について
申し訳ありません。書き換えがこんがらがりましたので、まっさらな状態からどうすればいいかを改めて教えて頂いてもよろしいでしょうか?(TMBitmapExを導入しています)
Re: tomoaky様の「TMTrunkGauge」について
まっさらな状態で下の部分を
if (Imported.TMBitmapEx) {
this.bitmap.fillRoundRect(0, 0, this.width, this.height, 3, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRoundRect((this.width / 2) - width / 2, 2, width, this.height - 4, 3, color);
}
} else {
this.bitmap.fillRect(0, 0, this.width, this.height, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRect((this.width / 2) - width / 2, 2, width, this.height - 4, color);
こうです
if (Imported.TMBitmapEx) {
this.bitmap.fillRoundRect(0, 0, this.width, this.height, 3, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRoundRect(2, 2, width, this.height - 4, 3, color);
}
} else {
this.bitmap.fillRect(0, 0, this.width, this.height, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRect(2, 2, width, this.height - 4, color);
if (Imported.TMBitmapEx) {
this.bitmap.fillRoundRect(0, 0, this.width, this.height, 3, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRoundRect((this.width / 2) - width / 2, 2, width, this.height - 4, 3, color);
}
} else {
this.bitmap.fillRect(0, 0, this.width, this.height, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRect((this.width / 2) - width / 2, 2, width, this.height - 4, color);
こうです
if (Imported.TMBitmapEx) {
this.bitmap.fillRoundRect(0, 0, this.width, this.height, 3, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRoundRect(2, 2, width, this.height - 4, 3, color);
}
} else {
this.bitmap.fillRect(0, 0, this.width, this.height, 'rgba(0, 0, 0, 0.6)');
if (this._trunk > 0) {
this.bitmap.fillRect(2, 2, width, this.height - 4, color);
Re: tomoaky様の「TMTrunkGauge」について
ご教示の通りに書き換えたところ、無事に丸みを帯びたまま左から右にゲージが増加するようになりました。
こちらの伝達不足でお手数をお掛けしたにも関わらず、修正にお付き合い頂き、ありがとうございました。
こちらの伝達不足でお手数をお掛けしたにも関わらず、修正にお付き合い頂き、ありがとうございました。