Skip to content

Instantly share code, notes, and snippets.

@KinoAR
Created December 1, 2020 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KinoAR/356e2ab23a4829d2e58a6238007b2355 to your computer and use it in GitHub Desktop.
Save KinoAR/356e2ab23a4829d2e58a6238007b2355 to your computer and use it in GitHub Desktop.
An example of conditional compilation
extern class Window_Help extends Window_Base {
/**
* The text that is displayed within the window.
*
* @protected
* @type {string}
* @memberof Window_Help
*/
private var _text: String;
//This if compileMV creates a conditional compilation block
#if compileMV
/**
* Creates an instance of Window_Help.
* @param {number} numLines
* @memberof Window_Help
*/
public function new(numLines: Int): Void;
#else
public function new(rect: Rectangle): Void;
#end
/**
* Sets the _text property of the window;
* this text will be displayed within the window.
* @param {string} text
* @memberof Window_Help
*/
public function setText(text: String): Void;
public function clear(): Void;
/**
* Sets the current item of the help window.
*
* @param {RPG.BaseItem} item
* @memberof Window_Help
*/
public function setItem(item: BaseItem): Void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment