Permalink
Browse files

Added a CLI style main menu :P

  • Loading branch information...
Fabián Heredia Montiel
Fabián Heredia Montiel committed Apr 26, 2012
1 parent 98e0a0c commit daba877802b4e9e2384369966cb9e38396ecf855
Showing with 37 additions and 2 deletions.
  1. +37 −2 Engine/__main__.py
View
@@ -33,6 +33,39 @@
##########
# Funciones Globales
+def typePrint(string):
+ for i in str(string):
+ stdout.write(i)
+ sys.stdout.flush()
+ sleep(0.1)
+
+def login():
+ print """
+################
+# SSH TERMINAL #
+################
+"""
+ typePrint("Login: \0\0\0\0SmithAnderson@company.com\n")
+ typePrint("Password: \0\0\0\0*****\0\0**\n")
+ typePrint("\n"*50)
+ typePrint("Welcome Back Agent Smith\n")
+ typePrint("Last login 9999999999999\n\0\0\0\0\0\0\0")
+ print "-" * 24, "\b" * 25,
+ typePrint("#"*24 + "\n")
+ menu()
+
+def menu():
+ typePrint("A surogate is ready\n")
+ typePrint("Move with WASDQE\n\0\0\0\0\0\0\0\0")
+ typePrint("Fire with space\n")
+ typePrint("Survive!\0\0\0\0\0\0\0\0\n")
+
+ #while(True)
+ typePrint("Proceed?(Y/N): ")
+ if raw_input().lower()[0] == 'y': return
+ typePrint("Logout?(Y/N): ")
+ if raw_input().lower()[0] == 'y': exit()
+ menu()
# Initialization of GLUT, GL and Engine
def init():
@@ -80,11 +113,13 @@ def init():
nTime = 1.0 / config.fps
tick = 0
- #info
+ # Info
print "OpenGL: ", glGetString(GL_VERSION), ", GLSL: ", glGetString(GL_SHADING_LANGUAGE_VERSION)
+ login()
+
# Main Loop
- # glutFullScreen()
+ glutFullScreen()
glutMainLoop()
# OpenGL Drawing

0 comments on commit daba877

Please sign in to comment.