Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
Posizionamento personalizzato per la finestra di scelta

    Ischenderun
  • Animatore

  • Utenti
  • Rens: 31
  • 0
  • StellettaStellettaStellettaStelletta
  • 781 messaggi
  • Sesso:Non Specificato
  • Abilità:Adepto

#1 Inviato 17 May 2022 - 15:14 PM

Per la rubrica: "fatto in casa per voi"

Oggi lo chef Ischenderun vi mostra un plugin per il riposizionamento personalizzato della finestra scelte basato su variabili e switch.

 

Scegliete lo switch che attiverà il funzionamento del plugin.

Scegliete 2 variabili di gioco che modificheranno la posizione della finestra in base alle vostre esigenze.

 

Posizionate le finestre dove vi pare.

 

 

Nota: copiate e incollate il codice seguente su un blocco note o un editor di codice.

Nominate il file: ISC_Position_choice_window

con estensione .js

Condite il tutto con olio e sale.

 

Buon riposizionamento delle finestre di scelta a tutti!

/*:
* @target MZ
* @plugindesc v1.00 ISC_Position_choice_window
* Allows the user to reposition the choices window
* @author Ischenderun
* 
*
* @param Variable Id x
* @type number
* @min 0
* @text Variable Id x
* @desc Set variable Id for position x
* @default 1
*
* @param Variable Id y
* @type number
* @min 0
* @text Variable Id y
* @desc Set variable Id for position y
* @default 2
*
* @param Switch
* @type number
* @min 1
* @text Switch number Id 
* @desc Set switch ID for run plugin
* @default 1
* @help Position_choice_window
*
* Choose the switch that enables the plugin.
* Choose which variables will affect the positioning (pixel) 
* of the choices window.
*
* When the switch is off the choice windows will work with
* the normal positions.
*  
*/

var Imported = Imported || {};
Imported.ISC_Position_choice_window = true;

var Isc = Isc || {};
Isc.POS = Isc.POS || {};
Isc.POS.version = 1.00

Isc.Parameters = PluginManager.parameters('ISC_Position_choice_window');
Isc.Param = Isc.Param || {};


Isc.Param.POSvariableIdx = Number(Isc.Parameters['variable Id x']);
Isc.Param.POSvariableIdy = Number(Isc.Parameters['variable Id y']);
Isc.Param.POSSwitch = Number(Isc.Parameters['Switch']);


Window_ChoiceList.prototype.updatePlacement = function() {
	var positionType = $gameMessage.choicePositionType();
	var messageY = this._messageWindow.y;
    this.width = this.windowWidth();
    this.height = this.windowHeight();
    if ($gameSwitches.value(Isc.Param.POSSwitch) === true){
    	this.y = $gameVariables.value(Isc.Param.POSvariableIdx);
    	this.x = $gameVariables.value(Isc.Param.POSvariableIdy);
    }else{
    	switch(positionType){
    		case 0:
    		this.x = 0;
    		break;
    		case 1:
    		this.x = (Graphics.boxWidth - this.width) / 2;
    		break;
    		case 2:
    		this.x = Graphics.boxWidth - this.width;
    		break;
    	}
    	if (messageY >= Graphics.boxHeight / 2){
    		this.y = messageY - this.height;
    	}else{
    		this.y = messageY + this._messageWindow.height;
    	}

    };
};

TqomNCR.png


Modificato da Ischenderun, 17 May 2022 - 15:15 PM.

☆Polvere di Stelle☆ ora anche su itch.io: https://ischenderun....lvere-di-stelle

 

Non ho particolari talenti, sono soltanto appassionatamente curioso.
Siate affamati, siate folli, perché solo coloro che sono abbastanza folli da pensare di poter cambiare il mondo lo cambiano davvero.

Ad maiora semper

 
HUks2tu.gif

 

Contatto Facebook : https://www.facebook.com/Ischenderun/

Pagina Facebook: https://www.facebook...100937052104281

 

 4753.png


    Guardian of Irael
  • Coniglietto Rosso

  • Rpg²S Admin
  • Rens: 195
  • 19
  • StellettaStellettaStellettaStellettaStellettaStelletta
  • 58424 messaggi
  • Sesso:Maschio
  • Provenienza:Bagnaia (Viterbo)
  • Abilità:Apprendista


#2 Inviato 17 May 2022 - 15:22 PM

Altro ottimo scriptino molto più che utile; avere i mostra scelta e le altre finestre in posizione fissa è una grave mancanza del programma! :sisi:


(\_/)
(^ ^) <----coniglietto rosso, me!     
(> <)

 
Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^
 
KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^
 
FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^  
 
REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

Spoiler





  • Feed RSS