How to properly apply arrows to a window?

So I've been making a thing that moves Guard (and any other commands I want) to either a right or left sub-page of the actor command window, kind of like how many of the mid-generation final fantasy games did it. Example:

k3JnGD8.gif


However, as you can see, the arrows suck even though everything else works perfectly. My limited experience with window manipulation is making this arguably the hardest part, which is dumb because it shouldn't be.

Anyway, what I want to do is:
  1. Use the actual window skin arrows instead of what you see in the image, which are just unicode symbols added via drawText().
  2. Place them on the edge of the window, rather than in with the contents.
So, if anyone can point me in the right direction, that'd be much appreciated. 🙂
Hmm, perhaps create a right and left arrow sprite within the base window code using the same graphic used by the down and up arrows. Then set the anchor to 0.5, rotate and mirror the sprite so it is pointing right or left. Then place those arrows on the right and left edges of the window, similar to or as same as the down and up arrows. In my opinion that would look more aesthetically pleasing.
I was hoping to reference the right and left arrows defined in the window.png file directly, since that allows anyone reskinning it to specifically define a left and right arrow to their liking. Is there no way to reference those? I'll admit, sprites and graphics in mv are pretty much unexplored territory for me right now. I've been working almost exclusively with behind-the-scenes logic and data manipulation until now.

Stupid arrows. 😀
Oh, that is what I meant. Use the same graphic of the up and down arrows. Check out 'Window.prototype._refreshArrows' in 'rpg_core.js' ... you could probably alias that and shove in left and right arrows. Also alias 'Window.prototype._updateArrows' for when the arrows appear on the window.
Perfect, that should get me going in the right direction. Not sure why I haven't delved into rpg_core more, esepecially since I crawl through all the other ones quite regularly. Thanks. 🙂
Also, the 'rotation' property of PixiJS sprites are in radians. So, for a 90 degree angle (point right) the value would need to be 4.712391, and for a 270 degree angle (point left) would need to be 1.570797.

Code:
this._rightArrowSprite.rotation = 4.712391;
this._leftArrowSprite.rotation = 1.570797;

// Or ..
this._rightArrowSprite.rotation = 270 * Math.PI / 180;
this._leftArrowSprite.rotation = 90 * Math.PI / 180;
I just grabbed the coords for the left and right arrows in window.png, so if they're styled completely different than the up and down arrows, it'll show that way. That said, everything is working perfectly now. Thanks again for pointing me in the right direction. 😀

2ITPqbm.png


Edit: This can probably be closed now.
@Aesica Aah, I had forgotten there even was left and right arrows in the windowskin. That works too!
@Aesica Great to know everything is working now. Can I assume the thread is fully answered? (sorry, little bug on my end and I can't see reports).
Yeah, I ninja-edited it in. This can be closed now.
I know you have it working, but I also made a plugin for anyone who wants.
It's more of just a base to go from, adds left/right arrows
(example shows them being set to Window_ChoiceList, all the time when it's open and visible)

...
Spoiler
See attachment 🙂

Edit:
Now with movement & adjustable speed 🙂
@ct_bolt Since OP's thread has been answered I'll close this thread. If you want to elaborate more on your plugin you can create a thread for it 🙂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-properly-apply-arrows-to-a-window.117530/