The "vngen_log_draw" Function

Syntax

vngen_log_draw(spr_background, spr_divider, spr_paused, spr_playing, sep, linebreak, font, color);
ArgumentTypeDescription
spr_backgroundsprite/macroSprite to draw as a fullscreen background while the log is open (or keyword 'none' for none)
spr_dividersprite/macroSprite to draw as a divider between logged entries (or keyword 'none' for none)
spr_pausedsprite/macroSprite to draw as paused audio icon (or keyword 'none' for none)
spr_playingsprite/macroSprite to draw as playing audio icon (or keyword 'none' for none)
seprealDistance in pixels between log entries and dividers (if any)
linebreakrealWidth in pixels before text is wrapped into a new line
fontfont/macroOverride font to draw logged text in (or keyword 'inherit' for logged style)
colorcolor/macroOverride color to draw logged text in (or keyword 'inherit' for logged style)

Description

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

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.

Example

vngen_log_draw(spr_backlog, spr_divider, spr_audio_off, spr_audio_on, 64, 1200, fnt_Arial, c_white);
vngen_log_draw(spr_backlog, spr_divider, spr_audio_off, spr_audio_on, 64, display_get_gui_width()*0.75, inherit, inherit);