moJoe

Villager
Member
Joined
Mar 10, 2021
Messages
5
Reaction score
1
First Language
English
Primarily Uses
RMMV
Yo!

Thanks to anisoft and poryg I've managed to configure PIXI.Sprite interactive and buttonMode features. Attached is a script example where the IconSet.png highlights as you hover over it, shines completely as you click it, and reverts to its original darkness upon pointer out.

That works all well and good but there is a deadzone where the Sprite doesn't interact with the mouse at all (by remaining in its original darkness) despite hovering and clicking on the Sprite. I've called the function in the overworld and the menu but the deadzone still persists.

I was wondering if there has been a topic discussing this or if there are any possible solutions to removing this deadzone. Although small it's rather annoying considering it spans the entire screen.

Help! :)

JavaScript:
Alias_Graphics_createModeBox = Graphics._createModeBox;
Graphics._createModeBox = function () {
Alias_Graphics_createModeBox.call(this);
this._modeBox.style.pointerEvents = "none";
}

Alias_Graphics_updateVideo = Graphics._updateVideo;
Graphics._updateVideo = function () {
Alias_Graphics_updateVideo.call(this);
this._video.style.pointerEvents = "none";
}

Alias_Graphics_updateUpperCanvas = Graphics._updateUpperCanvas;
Graphics._updateUpperCanvas = function () {
Alias_Graphics_updateUpperCanvas.call(this);
this._upperCanvas.style.pointerEvents = "none";
}

function InteractivePicture () {
    var pictext = new PIXI.Texture.from('img/system/IconSet.png');
    var pic = new PIXI.Sprite(pictext);
    pic.tint = 0x333333;
    pic.interactive = true;
    pic.buttonMode = true;
    SceneManager._scene.addChild(pic);
    var onClick = function () {pic.tint = 0xFFFFFF;};
    var onPointerOver = function () {pic.tint = 0x666666;};
    var onPointerOut = function () {pic.tint = 0x333333;};
    pic.on('pointerdown', onClick);
    pic.on('pointerover', onPointerOver);
    pic.on('pointerout', onPointerOut);
}
 

Latest Threads

Latest Posts

Latest Profile Posts

I can come up with all of the magic skills in the world, but I can hardly think of creative physical weapon skills within the JRPG realm. One of those ones....
It's time for episode 19 of our Make a Cliff Map in RPG Maker MZ... I mean, Make a Game in RPG Maker MZ! Today we're working on our cliff map again. Let's see if we can finish it this time!

A side story is almost getting into the next stage. Almost everything in this game has real-life references.
unfinishedbuildingwip1.jpg
Everyday life is full of absurdity. This is just a reflection.
TFW you discover how the script batching works in VNMaker... after you've had the program for almost 3 years.

Forum statistics

Threads
111,408
Messages
1,060,908
Members
144,765
Latest member
tinsel2
Top