Prev Previous Post   Next Post Next
Old 11-09-2019, 04:42 AM   #1
Human being with feelings
Dafarkias's Avatar
Join Date: Feb 2019
Location: England
Posts: 414
Default gfx.drawstr flags???

Having difficulty figuring out these 'flags'.

Here's the official documentation:

Lua: gfx.drawstr("str"[,flags,right,bottom])

Draws a string at gfx.x, gfx.y, and updates gfx.x/gfx.y so that subsequent draws will occur in a similar place.

If flags, right ,bottom passed in:
  • flags&1: center horizontally
  • flags&2: right justify
  • flags&4: center vertically
  • flags&8: bottom justify
  • flags&256: ignore right/bottom, otherwise text is clipped to (gfx.x, gfx.y, right, bottom)

I want to center justify, w/o doing it manually...

I've tried a handful of different combinations of inputs into the function, without avail.

Last edited by Dafarkias; 11-09-2019 at 04:48 AM.
Dafarkias is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 11:18 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.