diff --git a/src/TestSection.py b/src/TestSection.py new file mode 100644 index 0000000..4f2c6a2 --- /dev/null +++ b/src/TestSection.py @@ -0,0 +1,23 @@ +import pygame as pg +from src.Section import ColorSection + + +section = ColorSection +pg.init() + +w, h = 200, 250 +section.Setup(0, 0, w, h) + +screen = pg.display.set_mode((w, h)) +mouseX, mouseY = 0, 0 + +while 1: + mouseX, mouseY = pg.mouse.get_pos() + for e in pg.event.get(): + if e.type == pg.QUIT: + pg.quit() + quit() + elif e.type == pg.MOUSEBUTTONDOWN: + section.OnMouseDown(e.button, mouseX, mouseY) + + section.Draw(screen) diff --git a/src/Window.py b/src/Window.py index 5799c90..67f3976 100644 --- a/src/Window.py +++ b/src/Window.py @@ -5,7 +5,7 @@ class MainWindow: - w, h = 1600, 900 + w, h = 1280, 720 bgColor = (78, 82, 84) running = False @@ -13,7 +13,7 @@ class MainWindow: clock = pg.time.Clock() fps = 126 - originX, originY = 200, 600 + originX, originY = 200, h - 250 Brush.SetBrush('Pencil') # ----- for test -----