I fixed a... (Part II) bug with CCEX!

okay, now mind you, I am a BABY when it comes to learning this javascript stuff... and even more so when it comes to to strange coding of SRDude...

I was having a really bad time with the way my game was using mouse driven commands for pretty much everything in the Character creator EX, except the Hue Selector, which HAD to be done by arrows on the keyboard... but after a month, I have finally figured out and fixed the ability to have a mouse-driven HueSelector Window!!

Now, I'm still going to report the bug and the fix to SRDUDE on his own site, and so but... what i did was add wheel support to it! Here's what I did...

in SRD_CharacterCreatorEX.js - in and around the Line 2500, you have this line...
Window_HueSelector.prototype.update = function() {

That's the section that says, that if there's a TouchInput to click and go, I believe... well right before that, I put in....
Window_HueSelector.prototype.processWheel = function() {
if (this.isOpenAndActive()) {
var threshold = 20;
if (TouchInput.wheelY >= threshold) {
this.cursorRight();
}
if (TouchInput.wheelY <= -threshold) {
this.cursorLeft();
}
}
};

Not only does it update really fast, but it works well, then of course, click and it goes back... Again, there we go, another fix!
okay, now mind you, I am a BABY when it comes to learning this javascript stuff... and even more so when it comes to to strange coding of SRDude...

I was having a really bad time with the way my game was using mouse driven commands for pretty much everything in the Character creator EX, except the Hue Selector, which HAD to be done by arrows on the keyboard... but after a month, I have finally figured out and fixed the ability to have a mouse-driven HueSelector Window!!
Now, I'm still going to report the bug and the fix to SRDUDE on his own site, and so but... what i did was add wheel support to it! Here's what I did...
in SRD_CharacterCreatorEX.js - in and around the Line 2500, you have this line...
That's the section that says, that if there's a TouchInput to click and go, I believe... well right before that, I put in....
Not only does it update really fast, but it works well, then of course, click and it goes back... Again, there we go, another fix!

hi, am not sure i understand your issue, here it's for js support.
its seem to be a plugin issue support ?

whell
i recomande you to use this for mouse method support in your project.
If you need to control mosue fonctionality with any plugin


PHP:
myVar.onClick = function(event){
    console.log('debug mouse event:onClick ', event);
};
myVar.onMouseMove = function(event){
    console.log('debug mouse event: onMouseMove', event);
};
myVar.onMouseUp = function(event){
    console.log('debug mouse event:onMouseUp ', event);
};
document.addEventListener('mousedown', myVar.onClick.bind(myVar) );
document.addEventListener('mousemove', myVar.onMouseMove.bind(myVar) );
document.addEventListener('mouseup', myVar.onMouseUp.bind(myVar) );

and here a great post to learn how debug all mouse event in DOM for rmmv
https://forums.rpgmakerweb.com/index.php?threads/help-dom-where-are-store-eventlistener.87231/
its the best peformance way to work with listener and mouse input or key input

maybe pass and repalce myVar to Window_HueSelector, in the bind
document.addEventListener('mousedown', myVar.onClick.bind(Window_HueSelector) );
its will give you acces with this. in the scope
I definitely treasure your input...

However, with SRDude's Window_HueSelector, it was a simple selector window, left arrow changes the color index -1, right arrow changes it plus 1, and mouse click chooses the option that's shown on the screen.

I posted it in Learning Javascript, because... well, I am learning, and thought it would be nice to post my learning victories. In this case, it was to be able to use the mouse wheel to choose the right option, or HUE. I've also learned how to pass the filename and color to the right variables. I think I want to go back and change MOST of my windows to be wheel-intuitive... those that aren't already such.
Is it possible to use hexadecimal codes for color?

Original thread: https://forums.rpgmakerweb.com/threads/i-fixed-a-part-ii-bug-with-ccex.87736/