Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Displays the Intro Screen--
- local w,h = term.getSize()
- local selectedItem = 1
- running = true
- term.setBackgroundColor(colors.white)
- term.clear()
- function exit()
- running = false
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(1,1)
- print("Thank you for playing")
- return running
- end
- function spop()
- term.clear()
- shell.run(shell.resolve(".").."singleplayer")
- end
- function mpop()
- term.clear()
- shell.run(shell.resolve(".").."custom")
- end
- function psop()
- term.clear()
- shell.run(shell.resolve(".").."stats")
- end
- function main()
- while running do
- local event, button, X, Y = os.pullEvent()
- if event == "mouse_click" then
- if X >= w/2 - 6 and X <= w/2 + 6 and Y == 13 and button == 1 then
- spop()
- elseif X >= w/2 - 5 and X <= w/2 + 5 and Y == 14 and button == 1 then
- mpop()
- elseif X >= w/2 - 3 and X <= w/2 + 3 and Y == 15 and button == 1 then
- psop()
- elseif X >= w/2 - 2 and X <= w/2 + 2 and Y == 16 and button == 1 then
- exit()
- end
- end
- end
- end
- function drawBg()
- bg = paintutils.loadImage(shell.resolve(".").."bgt")
- paintutils.drawImage(bg, 1,1)
- term.setCursorPos(w/2 - 7, 1)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- print("WORLD OF TANKS")
- term.setCursorPos(w/2 - 9, 11)
- print("Choose A Game Mode")
- term.setCursorPos(w/2 - 6, 13) --Singleplayer
- print("Singleplayer")
- term.setCursorPos(w/2 - 5, 14) --Customize
- print("Customize")
- term.setCursorPos(w/2 - 3, 15) --Stats
- print("Stats")
- term.setCursorPos(w/2 - 2, 16) --Exit
- print("Exit")
- main()
- end
- drawBg()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement