aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/graphics.lua.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-22 21:30:21 +0800
committerchai <chaifix@163.com>2018-10-22 21:30:21 +0800
commit58d09aa3ca4409e2a15473b0ac3c0446f0acb1a2 (patch)
tree37dadab5575116c75b54064556b045ba8a245871 /src/lua/embed/graphics.lua.h
parent99bea1e47c813016d89c9e99296fa66e183d808f (diff)
*misc
Diffstat (limited to 'src/lua/embed/graphics.lua.h')
-rw-r--r--src/lua/embed/graphics.lua.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/embed/graphics.lua.h b/src/lua/embed/graphics.lua.h
index 288d2f4..5fa5dad 100644
--- a/src/lua/embed/graphics.lua.h
+++ b/src/lua/embed/graphics.lua.h
@@ -35,4 +35,12 @@ jin.graphics.unuseShader = function()
jin.graphics.useShader(default_shader)
end
+-- Reset all attributes to default value.
+jin.graphics.reset = function()
+ jin.graphics.setColor(255, 255, 255, 255)
+ jin.graphics.setClearColor(0, 0, 0, 255)
+ jin.graphics.clear()
+ jin.graphics.unsetFont()
+end
+
)";