Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo 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")
Exemplo 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)

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