The "vngen_log_draw" Function
vngen_log_draw(spr_background, spr_divider, spr_paused, spr_playing, sep, linebreak, font, color, speed);
|spr_background||sprite/macro||Sprite to draw as a fullscreen background while the log is open (or keyword ‘none’ for none)|
|spr_divider||sprite/macro||Sprite to draw as a divider between logged entries (or keyword ‘none’ for none)|
|spr_paused||sprite/macro||Sprite to draw as paused audio icon (or keyword ‘none’ for none)|
|spr_playing||sprite/macro||Sprite to draw as playing audio icon (or keyword ‘none’ for none)|
|sep||real||Distance in pixels between log entries and dividers (if any)|
|linebreak||real||Width in pixels before text is wrapped into a new line|
|font||font/macro||Override font to draw logged text in (or keyword ‘inherit’ for logged style)|
|color||color/macro||Override color to draw logged text in (or keyword ‘inherit’ for logged style)|
|speed||real||The global speed multiplier for all sprite animations in the current object|
Draws the backlog with the given stylization, when visible. By default, the log is not visible and must be toggled with vngen_toggle_log to be displayed even while this script is running. This script is intended to be run in the Draw GUI Event.
Backlog elements are designed to be responsive and can adapt to real-time changes in resolution and aspect ratio, provided the linebreak setting allows it. For this reason, it is highly recommended to use a linebreak setting relative to the dimensions of the GUI layer itself. The GUI layer can then be scaled to match the display resolution with the GameMaker Studio function display_set_gui_maximise.
Note: As vngen_set_scale already scales the GUI along with other elements, if this script is active it is not necessary to run display_set_gui_maximise manually.
Like vngen_object_draw, vngen_log_draw uses an animation speed multiplier to adapt sprite-based animations to any framerate. VNgen is designed for a base framerate of 60 FPS, meaning a 1x speed multiplier will assume all sprites are rendered with 60 FPS animations. However, sprites require memory and page flipping, meaning such high-framerate animations can quickly consume performance. It may be preferable to use 30 FPS sprites or less, but in a 60 FPS game these sprites will appear to run at double speed. In this case, setting the global animation speed multiplier to 0.5x will cause sprites to play back at normal speed while the rest of the game continues to operate at 60 FPS (or any other framerate?as 60 FPS is assumed, in this example the multiplier should still be 0.5 even if room speed is set to 30).
Example: vngen_log_draw(spr_backlog, spr_divider, spr_audio_off, spr_audio_on, 64, 1200, fnt_Arial, c_white, 1); vngen_log_draw(spr_backlog, spr_divider, spr_audio_off, spr_audio_on, 64, display_get_gui_width()*0.75, inherit, inherit, 0.5);