raylib-goplus icon indicating copy to clipboard operation
raylib-goplus copied to clipboard

[QoL] text functions should support Sprint

Open Lachee opened this issue 6 years ago • 1 comments

The Current Issue DrawText currently takes a string and draws a text to the screen

The Paradigm to Match The text argument is flat and must require a manual call to Sprint for formatting. A better solution would to incorporate this.

The Proposal The proposal is for all text functions to have a second version created that accepts an ...interface{} like Sprint. In the provided example, DrawText will now get a sibling: DrawFormattedText.

The prefix is a WIP. Here are some suggestions: DrawFormattedText DrawStext DrawTextf DrawTextFormatted DrawSprint SDrawText

Feedback is welcomed

Lachee avatar Nov 06 '19 02:11 Lachee

I think that DrawTextF would be the best name for the function.

harryisgamer avatar Jan 12 '20 22:01 harryisgamer