StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
Hopefully this a simple fix; though I could not figure out myself. I want the gold number to aligned to the right.

Unaligned.png

I have a feeling it's related to this section Yanfly's Core Engine code:
Yanfly Engine Core.png

Or this section of code from SumRndmDde Alt FF7 Menu:
FF7 Gold & Time Window.png

I'm using this plugin to change the word "time" from the FF7 plugin into an icon.

Here's all my plugins if needed:
My Plugins.png
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
389
Reaction score
443
First Language
French
Primarily Uses
RMMZ
Hello. Change the last argument of the drawText function to 'left' instead of 'right'.
Should do it.

edit: seems I read too fast. To align it to more to the right, add a little offset to the wx argument, like:
Code:
let wwx = wx + 20
this.drawText(unit, wwx, wy, ww, 'right')
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
That didn't seem to change anything. This is what you meant, right? In Yanfly's code?

Code:
this.drawText(unit, wx + 20 , wy, ww, 'right');
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
389
Reaction score
443
First Language
French
Primarily Uses
RMMZ
Hello, yeah it was an edit for yanfly coreEngine in the drawCurrency function. Just tested it and it work for me, but I don't have the SRD plugin. Does that plugin have its own drawCurrency function, or it call it from windowBase?
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
As in the first post, the second block of code, it also has a window.goldandtime.

Maybe I need to have both say wx + 20 and 'right'?
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
389
Reaction score
443
First Language
French
Primarily Uses
RMMZ
Hello, sorry for late response, I was at work.
Then you could try to offset it in SRD plugin by adding + 20 to the x argument
Code:
this.drawCurrencyValue(this.value(), this.currencyUnit(), x + 20, this.lineHeight(), width)
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
It moves the number... And the icon...

2020-10-17 00_20_41-Silver Monster.png
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
389
Reaction score
443
First Language
French
Primarily Uses
RMMZ
Hello again, I downloaded the SRD plugin to test it with both plugins. I can still move the text to the right with the changes in YEP_coreEngine. Be sure to offset both drawText functions, that's why I stored the offset in a local variable in my first example, sorry if it wasn't clear enough...
Capture d’écran, le 2020-10-17 à 08.50.01.png
Should work now.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
389
Reaction score
443
First Language
French
Primarily Uses
RMMZ
Hello @Killerslash, if you're using YEP_coreEngine, I think there's a parameter to change the text alignment (but will affect all menus), or you can paste these lines in SRD plugin or any other:
Code:
Window_MenuCommand.prototype.itemTextAlign = function() {
    return 'center';
};
That should do it.
If not, start a separate thread for your problem, and we'll see what can be done ;)
 

Killerslash

Veteran
Veteran
Joined
Mar 31, 2017
Messages
114
Reaction score
21
First Language
Arabic
Primarily Uses
RMMV
I am not using YEP core engine.
 

Killerslash

Veteran
Veteran
Joined
Mar 31, 2017
Messages
114
Reaction score
21
First Language
Arabic
Primarily Uses
RMMV
It's working without YEP CoreEngine.
Thanks for your help.
:smile:
 
  • Like
Reactions: TSR

Latest Threads

Latest Posts

Latest Profile Posts

Another comic with Backstage Malak...
If you want to ask him anything, you can ask on my DeviantArt page! I'm not sure if you're allowed to do it here.
Forum tip of the day ...
If you get a temporary suspension for being a jerk to people who are trying to help you, and arguing with mods and admins, don't go making new accounts. Chances are, if you p**s us off enough to suspend you for a week, we're not going to hesitate giving you a permanent ban when you give us a reason.
E_6fAErVkAQILXu.png
I'm so close to releasing my game on steam! :blush::blush::blush:
Us:
"This game is awesome! I wish there are more games like this in the future."
Also us:
"I hate how games stopped being original and start copying other successful games."
Should've done this a few days ago but...
PRI_200136808.jpg
Rest in Peace, Sir Clive Sinclair
1940 - 2021
Entrepreneur, Technologist, Father of the Modern British Computing Industry, and protagonist of Legend of ZUN.

Without you, England's games and tech industry wouldn't be where it is.

Forum statistics

Threads
115,292
Messages
1,088,692
Members
149,927
Latest member
antodi
Top