rpgmaker.ru/forum/ccsmv/61017-normalnoe-vydelenie-knopok-myshyu нашла замечательный плагин deadelf79. самое то, что мне нужно - хочу, чтобы кнопочки в меню при наведении на них мигали.
есть проблема: при открытии меню, меню предметов нельзя нажать: на него можно навести курсор, но вот "закрепить его" чтобы посмотреть предметы, нельзя. на функциях боя не проверяла. без понятия как это работает.
проверила: со всеми другими плагинами дружит, сам по себе устраивает такой прикол. самого дедэльфа нигде в инете найти не могу(забросил все соцсети, судя по всему).... может, кто-то может помочь с его скриптом или подсказать похожий? буду очень благодарна за помощь
//=============================================================================
// MouseOverselect.js
//=============================================================================
/*:
* @plugindesc Did you like need make double click to select buttons? If no, this plugin will help you
* @version 1.3
* @author DeadElf79
*
* @help This plugin does not provide plugin commands.
*/
var Imported = Imported || {};
Imported.De79_MouseOverselect = true;
(function() {
// CORE
/**
* [read-only] The x coordinate on the canvas area of the realtime mouse position.
*
* @static
* @property realtime_x
* @type Number
*/
Object.defineProperty(TouchInput, 'realtime_x', {
get: function() {
return this._realtime_x;
},
configurable: true
});
/**
* [read-only] The y coordinate on the canvas area of the realtime mouse position.
*
* @static
* @property realtime_y
* @type Number
*/
Object.defineProperty(TouchInput, 'realtime_y', {
get: function() {
return this._realtime_y;
},
configurable: true
});
var _onMouseMoveWithOnlyTouch = TouchInput._onMouseMove;
TouchInput._onMouseMove = function(event) {
// original
_onMouseMoveWithOnlyTouch.call(this,event);
//addition
this._realtime_x = Graphics.pageToCanvasX(event.pageX);
this._realtime_y = Graphics.pageToCanvasY(event.pageY);
};
// WINDOW
Window.prototype.isMouseOver = function() {
var x = this.canvasToLocalX(TouchInput.realtime_x);
var y = this.canvasToLocalY(TouchInput.realtime_y);
if (x + this.x < this.x || x + this.x > this.x + this.width ||
y + this.y < this.y || y + this.y > this.y + this.height){
return false;
} else {
return true;
}
};
// WINDOW SELECTABLE
Window_Selectable.prototype.update = function() {
Window_Base.prototype.update.call(this);
this.updateArrows();
this.processCursorMove();
this.processHandling();
this.processWheel();
this.processTouch();
this.processMouseOverselect();
this._stayCount++;
};
Window_Selectable.prototype.processMouseOverselect = function() {
var x = this.canvasToLocalX(TouchInput.realtime_x);
var y = this.canvasToLocalY(TouchInput.realtime_y);
var hitIndex = this.hitTest(x, y);
var mouseOver = this.isMouseOver();
if (!mouseOver){
this.select(-1);
} else {
if (typeof(hitIndex)!=='undefined'){
if (hitIndex>-1){
this.select(hitIndex);
}
}
}
};
// WINDOW CHOICE LIST - COMPATIBILITY for GALV'S "VISUAL NOVEL CHOICES"
if (Imported.Galv_VisualNovelChoices == true){
Window_ChoiceList.prototype.update = function() {
// DeadElf79's code
this.processMouseOverselect();
// Galv's code
Galv.VNC.Window_ChoiceList_update.call(this);
if (this._vnIndex != this._index) {
this.refresh();
this._vnIndex = this._index;
}
};
}
// SCENE TITLE - COMPATIBILITY for SOUL ULTIMATE TITLE SCREEN
if (SOUL_MV != null){
// in future versions...
}
})();