Esempio n. 1
0
 def move_down(*y):
     if not y:
         Cursor.y += 1
         Screen.print("\033[1B")
     else:
         Cursor.y += y
         Screen.print("\033[" + str(x) + "B")
Esempio n. 2
0
 def move_up(*y):
     if not y:
         Cursor.y -= 1
         Screen.print("\033[1A")
     else:
         Cursor.y -= y
         Screen.print("\033[" + str(x) + "A")
Esempio n. 3
0
 def move_right(*x):
     if not x:
         Cursor.x += 1
         Screen.print("\033[1C")
     else:
         Cursor.x += x
         Screen.print("\033[" + str(x) + "C")
Esempio n. 4
0
 def move_left(*x):
     if not x:
         Cursor.x -= 1
         Screen.print("\033[1D")
     else:
         Cursor.x -= x
         Screen.print("\033[" + str(x) + "D")
Esempio n. 5
0
from cursor.cursor import Cursor
from screen.screen import Screen
from getch import getch
import time
import sys

Screen.clear()
screen_width, screen_height = Screen.size()
print(str(screen_width) + " " + str(screen_height))
key = getch()
Screen.print(key)

Esempio n. 6
0
 def move(x, y):
     Cursor.x = x
     Cursor.y = y
     Screen.print("\033[" + str(x) + ";" + str(y) + "H")