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

Just spent $174 on Shining the Holy Ark on the Saturn. Good lord.
My brain when designing quests:
There is piano, it needs help --> The organ (yes organ now) is missing a component! --> Where the heck am I supposed to put this missing piece!??! --> Add an entire new mini dungeon specifically created to house this new piece. --> Connect this brand new mini dungeon to an already designed dungeon with background information about the town it's found it.

Me: :LZYhuh:
Rising of the Shield Hero!
Sheesh, Guys, don't think you can throw easy prices like $25/$50 on potions/ethers then have monsters pay you $75 for killing them (never understood that concept btw lol) and think it'll all work out!!! Just realized my prcies vs payout left my players unable to get decent stuff without some serious farming from the start, i'm about to call H&R Block to help my MC get his stimulus check just to buy new armor :LZSlol:

Forum statistics

Threads
111,095
Messages
1,058,222
Members
144,290
Latest member
Blizzie
Top