-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.lua
More file actions
26 lines (20 loc) · 755 Bytes
/
gui.lua
File metadata and controls
26 lines (20 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function setColor(color, gc)
if color == "black" then gc:setColorRGB(0, 0, 0) return end
if color == "red" then gc:setColorRGB(220, 0, 0) return end
if color == "green" then gc:setColorRGB(0, 220, 0) return end
if color == "blue" then gc:setColorRGB(0, 0, 220) return end
end
function resetFont(gc)
setColor("black", gc)
gc:setFont("sansserif", "r", 12)
end
function drawHeading(gc)
gc:setFont("sansserif", "b", 12)
gc:drawString("Lua prime checker for TI-nspire", 0, 0, "top")
end
function drawLink(gc)
gc:setFont("sansserif", "r", 10)
gc:drawString("for more info, please check", 20, 170, "top")
setColor("blue", gc)
gc:drawString("https://github.com/alexcoder04/prime-checker", 20, 180, "top")
end