![]() ![]() And "drawItem()" itself then calls "drawText()" to actually draw the text. The way it works is that Window_Command's "addCommand()" pushes its arguments, including the name string of the command added, into an Array called "_list" (as in 'command list') and then bulk prints all the command names there on the list using one single function called "drawAllItems()", which is inherited from its parent class, Window_Selectable (which is called in Window_Command's "refresh()" method when it calls Window_Selectable's version of "refresh()").įor each and every command to be printed, "drawAllItems()" then calls the function "drawItem()", adjusting the x/y argument for each time it calls "drawItem()" so that the next command isn't drawn over the previous one on screen. It uses the basic "drawText()" instead, which does not look for any text codes. However, Window_Command does not use "drawTextEx()" when it prints the command names. So if you had a string like "\I Bree" then "drawTextEx()" would print icon #1 from the iconset onto the screen followed by "Bree". This function parses whatever string that it is fed and detects text codes like "\I" or "\V" - the sort you put into your Show Text event commands to show icons or variable values in your text - and prints the relevant values in their place. Let me explain: In RMMV (and VX/Ace and probably MZ), the "quick" and "simple" way to draw icons in a Window is to use the "drawTextEx()" function. ![]() Click to expand.Like most things with scripting/plugins, the answer in this case is "yes", but you will have to put in a bit of effort.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |