View source code: https://github.com/a-mean-blogger/text-game-maker-js/blob/master/src/managers/screen-manager/screen-manager_cursor.js
Class (extends TM.IObject)
**This class is made to use as an sub property of TM.ScreenManager. so that's why the class name start with ScreenManager_A class that creates instances control the cursor. The cursor property of TM.ScreenManager's instance is the instance of this class.
true
after calling init function, false
after calling inactivate. The Object status(active/inactive) can be checked by this property.**The cursor can not be outside of Screen
**View example source code: screen-manager_cursor-tutorial.js
First, create an instance of TM.ScreenManager and assign to var TMS(Text Game Maker Screen). TM.ScreenManager_Cursor's instance is created and assigned to TMS.cursor
var TMS = new TM.ScreenManager();
Move cursor to (10,5)
TMS.cursor.move(10,5);
Type these commands into the browser console on this page to test.
TMS.cursor.hide() //hide the cursor TMS.cursor.show() //show the cursor TMS.cursor.move(2,10) //move cursor to (2,10)
Comments
Login with SNS account to write comments. see details