diff --git a/scripts/demo1.py b/scripts/demo1.py index 9099847..2f4037d 100755 --- a/scripts/demo1.py +++ b/scripts/demo1.py @@ -44,6 +44,7 @@ def draw_current_color(): hdc.solid_rectangle(cmd2_rect[0] + 6, cmd2_rect[1] + 6, cmd2_rect[0] + 54, cmd2_rect[1] + 54) def select_next_color(): + global current_color current_color += 1 if current_color == len(color_list): current_color = 0 @@ -99,6 +100,7 @@ def draw_current_tool(): hdc.bitblt(cmd1_rect[0] + 6, cmd1_rect[1] + 6, cmd1_rect[0] + 54, cmd1_rect[1] + 54, hdc_bits, 0, 0, 0) def select_next_tool(): + global current_tool current_tool += 1 if current_tool == len(tool_list): current_tool = 0