diff --git a/README.md b/README.md index 4e62b58..7763840 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,4 @@ -

- PyGWin -

+# PyGWin +A library for creating Python applications. -

- A library for creating Python applications. -

- -

- - Documentation - -

+[Documentation](https://github.com/themixray/pygwin/wiki) \ No newline at end of file diff --git a/build/lib/pygwin/console.py b/build/lib/pygwin/console.py index fdc806c..c6dcc2c 100644 --- a/build/lib/pygwin/console.py +++ b/build/lib/pygwin/console.py @@ -60,3 +60,4 @@ class console: self.focus() pag.screenshot(path, region=rect) return path +console = console() diff --git a/build/lib/pygwin/gamepad.py b/build/lib/pygwin/gamepad.py index 7f585ec..fb1b366 100644 --- a/build/lib/pygwin/gamepad.py +++ b/build/lib/pygwin/gamepad.py @@ -28,7 +28,10 @@ class gamepad: self._pygame = pygame self._start() def _tick(self): - events = _inputs.get_gamepad() + try: + events = _inputs.get_gamepad() + except: + return if not self._pygame.display.get_active(): return self.founded = True diff --git a/build/lib/pygwin/ui.py b/build/lib/pygwin/ui.py index 17c1bc3..70f4ddf 100644 --- a/build/lib/pygwin/ui.py +++ b/build/lib/pygwin/ui.py @@ -624,6 +624,15 @@ class checkBox(widget): def draw(self, win, pos): self._generate(pos) win.blit(self.surface,pos) +# class colorPicker(widget): +# def __init__(self): +# self._generate() +# def _generate(self, position=None): +# self.surface = _s((255,self.width)) +# +# def draw(self, win, pos): +# self._generate(pos) +# win.blit(self.surface,pos) class base: def __init__(self, win, bg=(128,128,128)): self._widgets = {} diff --git a/dist/pygwin-0.0.1-py3.7.egg b/dist/pygwin-0.0.1-py3.7.egg index 29c97c6..2330b36 100644 Binary files a/dist/pygwin-0.0.1-py3.7.egg and b/dist/pygwin-0.0.1-py3.7.egg differ diff --git a/src/pygwin/console.py b/src/pygwin/console.py index fdc806c..c6dcc2c 100644 --- a/src/pygwin/console.py +++ b/src/pygwin/console.py @@ -60,3 +60,4 @@ class console: self.focus() pag.screenshot(path, region=rect) return path +console = console() diff --git a/src/pygwin/gamepad.py b/src/pygwin/gamepad.py index 7f585ec..fb1b366 100644 --- a/src/pygwin/gamepad.py +++ b/src/pygwin/gamepad.py @@ -28,7 +28,10 @@ class gamepad: self._pygame = pygame self._start() def _tick(self): - events = _inputs.get_gamepad() + try: + events = _inputs.get_gamepad() + except: + return if not self._pygame.display.get_active(): return self.founded = True diff --git a/src/pygwin/ui.py b/src/pygwin/ui.py index 17c1bc3..70f4ddf 100644 --- a/src/pygwin/ui.py +++ b/src/pygwin/ui.py @@ -624,6 +624,15 @@ class checkBox(widget): def draw(self, win, pos): self._generate(pos) win.blit(self.surface,pos) +# class colorPicker(widget): +# def __init__(self): +# self._generate() +# def _generate(self, position=None): +# self.surface = _s((255,self.width)) +# +# def draw(self, win, pos): +# self._generate(pos) +# win.blit(self.surface,pos) class base: def __init__(self, win, bg=(128,128,128)): self._widgets = {}