Beispiel #1
0
def task(cont = False):
    # Delete and redraw the current box
    Boxes.getCur().delete_rect(SelWindow.w).draw_rect(SelWindow.w)

    # Update the info text at the top
    SelWindow.w.delete(SelWindow.text)
    SelWindow.text = SelWindow.w.create_text((s.WINDOW_WIDTH/2, 10),
           		text = str(Boxes.sel) + "selected - O = save output, 1-9 to change box num, T = toggle type, C = clear current box, close window to return to setup")
    
    if cont:
        SelWindow.master.after(2000,task)  # reschedule event in 2 seconds
Beispiel #2
0
def task(cont=False):
    # Delete and redraw the current box
    Boxes.getCur().delete_rect(SelWindow.w).draw_rect(SelWindow.w)

    # Update the info text at the top
    SelWindow.w.delete(SelWindow.text)
    SelWindow.text = SelWindow.w.create_text(
        (s.WINDOW_WIDTH / 2, 10),
        text=str(Boxes.sel) +
        "selected - O = save output, 1-9 to change box num, T = toggle type, C = clear current box, close window to return to setup"
    )

    if cont:
        SelWindow.master.after(2000, task)  # reschedule event in 2 seconds
Beispiel #3
0
def callbackKey(event):
    key = (event.char)
    try:
    	# Make an output file
        if key == 'o':
            output_coords()
		
	    # Swap the type of the box
        if key == 't':
            Boxes.getCur().swap_type()

	    # Clear the current box
        if key == 'c':
            Boxes.getCur().clear()
        
        # Switch the setting to a new number
        i = int(key)
        if i < 10 and i >= 0:
            Boxes.setCur(i)
            print "INFO: Switching to", i
    except: pass
    
    task()
Beispiel #4
0
def callbackKey(event):
    key = (event.char)
    try:
        # Make an output file
        if key == 'o':
            output_coords()

# Swap the type of the box
        if key == 't':
            Boxes.getCur().swap_type()

# Clear the current box
        if key == 'c':
            Boxes.getCur().clear()

        # Switch the setting to a new number
        i = int(key)
        if i < 10 and i >= 0:
            Boxes.setCur(i)
            print "INFO: Switching to", i
    except:
        pass

    task()
Beispiel #5
0
def callbackMouse(event):
    SelWindow.w.focus_set()
    Boxes.getCur().update_pos(event.x, event.y)
    print "INFO: Clicked at", event.x, event.y
    task()
Beispiel #6
0
def callbackMouse(event):
    SelWindow.w.focus_set()
    Boxes.getCur().update_pos(event.x, event.y)
    print "INFO: Clicked at", event.x, event.y
    task()