Discord
Steam
/
Garry's Mod
/
Developers
/
Anyone have th..
Login/Join
Event Log
Anyone have the code for rotated draw.SimpleText?
2 replies, posted
Search
In This Thread
I believe Wizard of Ass posted it inside one of the WAYWO's, can't remember which one though.
[lua] -- Author: Wizard of Ass -- [url]http://www.facepunch.com/threads/1089200?p=32614030&viewfull=1#post32614030[/url] local DrawText = surface.DrawText local SetTextPos = surface.SetTextPos local PopModelMatrix = cam.PopModelMatrix local PushModelMatrix = cam.PushModelMatrix local matrix = Matrix() local matrixAngle = Angle(0, 0, 0) local matrixScale = Vector(0, 0, 0) local matrixTranslation = Vector(0, 0, 0) function draw.TextRotated(text, x, y, xScale, yScale, angle) matrixAngle.y = angle matrix:SetAngle(matrixAngle) matrixTranslation.x = x matrixTranslation.y = y matrix:SetTranslation(matrixTranslation) matrixScale.x = xScale matrixScale.y = yScale matrix:Scale(matrixScale) SetTextPos(0, 0) PushModelMatrix(matrix) DrawText(text) PopModelMatrix() end[/lua]
[QUOTE=_Chewgum;40311116][lua] -- Author: Wizard of Ass -- [url]http://www.facepunch.com/threads/1089200?p=32614030&viewfull=1#post32614030[/url] local DrawText = surface.DrawText local SetTextPos = surface.SetTextPos local PopModelMatrix = cam.PopModelMatrix local PushModelMatrix = cam.PushModelMatrix local matrix = Matrix() local matrixAngle = Angle(0, 0, 0) local matrixScale = Vector(0, 0, 0) local matrixTranslation = Vector(0, 0, 0) function draw.TextRotated(text, x, y, xScale, yScale, angle) matrixAngle.y = angle matrix:SetAngle(matrixAngle) matrixTranslation.x = x matrixTranslation.y = y matrix:SetTranslation(matrixTranslation) matrixScale.x = xScale matrixScale.y = yScale matrix:Scale(matrixScale) SetTextPos(0, 0) PushModelMatrix(matrix) DrawText(text) PopModelMatrix() end[/lua][/QUOTE] Thanks.
Sorry, you need to
Log In
to post a reply to this thread.