Giter Site home page Giter Site logo

bhavyemathur / goopylib-v1 Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 1.0 86.59 MB

A simple-yet-powerful 2D graphics framework built on top of Tkinter capable of creating good-looking & modern GUIs, games, and simple animations.

Home Page: https://pypi.org/project/goopylib

License: MIT License

Python 74.34% C 14.69% Objective-C 10.98%
graphics games python gui tkinter easing-functions computer-graphics-algorithms

goopylib-v1's People

Contributors

bhavyemathur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

yuvrajthorat

goopylib-v1's Issues

Remove Checkbox disabled, hover, clicked, etc. graphics and keep only true & false graphics

The Checkbox class currently takes in the true graphic & false graphic as well as hover, clicked, & disabled graphics each for true & false. However, a user can simply supply a Button object for the true & false graphics that handles disabled, clicked, and hover graphics automatically.

Thus there is no need to supply the disabled, hover, & clicked graphics for the Checkbox separately. So remove the unneeded inputs of the checkbox class.

Graphics Layout Creator

Create an application to automatically set the layout (positioning, rotation, etc.) of objects visually and transfer that to code.

Image Manipulation

Introduce Image Manipulation using the PIL library such as Tinting, Transformations, etc.

Bug: Rectangle's Width not being set to zero even though specified

When I am trying to create a rectangle and setting its width to 0, it doesn't reflect in the actual window. My code:

from goopy import *

setStyle("dark gui")
window = GraphWin(title="Example GUI Design", height=800, width=900, autoflush=False)

Rectangle(Point(20, 70), Point(295, 385), isRounded=True, fill="primary fill", width=0).draw(window)

while True:
    window.updateWin()

and the output:

image

Binding Objects

Bind the attributes of a graphics object (mainly position & rotation) to another.

Animated GIFs & Videos

Include Animated GIFs and Videos as Graphics Objects that can be displayed and played on the window.

Custom Title Bars

Make the title bars of the GraphWin customizable to have dropdown navigation buttons, etc.

Rotated Resizing Arrow

Add a 45 deg. (and others if possible) rotated arrow when resizing an object in both the x & y-direction

Design Choice: one file or X files?

All the code in one file, a la John Zelle's graphics.py package is quite ungainly with over 3000 lines.

Do you want to keep everything in one file, or are you considering splitting the code into various modules?

GraphWin Max Size

Just like there is a minimum size for the GraphWin, add a maximum size.

Full Custom-Cursor Support

Right now, this exists at a small-scale. Add support to use different cursors for different events and widgets.

Grid System

Create a grid similar to that of a CSS-grid to organize objects in the GraphWin.

Draggable Objects

Create a function that allows the user to drag objects around the screen.

More Animations!

Add animations to edit any option of an object like transformations, colour-changing, etc.

Mac OSX Support

Add support for Macs (mainly the getting rid of the keyboard module).

More Colour Definitions

Add more colour definitions and styles for the user to easily customize their applications.

Documentation

Create detailed documentation in the form of a website/document and YouTube videos explaining how to use this.

Entry Limit Inputs

Add support for limiting what players can type in entries - only alphabets, only numbers, some custom combination, etc.

Database Support

Try adding simple data storing functions to quickly store data locally on the computer.

Customizable Colour Gradients

Rather than a colour gradient just being composed of 2 colours: start & end, give the user more options to maybe add a third colour - or any number of colours. Add different locations in time for these colours as well so that all of them aren't equally present.

Sound Engine

Add an extensive sound engine to play sounds and music for an application. This should have support for volume control, sound manipulation, automated sound playing for widgets like the Slider or Button, etc.

Finish Compound Classes

Complete testing, functions, etc. for basic compound classes like the RadioButton, CycleButton, etc.

More Useful Errors

Add better error messages than can help the user track down their errors quickly.

Path editor & Easing Visualizer

Create an application to help the user create custom ease functions (like that in Adobe Animate) and a path editor to set the motion path of a graphics object.

Better Bounding-Boxes

Add Polygonal Bounding-Boxes for _BBox and similar classes and Transparency-based bounding boxes for images.

Callback Functions

Add callback function for widgets like the button to automatically execute a function when an event occurs on the widget.

Lighting Engine

Create a 2D lighting engine to help create shadows, lighting effects, etc.

Add a self contained example in the doc/readme

The two examples provided are a pain to run, I am afraid:

One requires an image in a texture folder, but none are provided; the other is an incomplete code fragment that seems to also require an image that is not provided.

The readme would gain to have a couple of example of basic use :

A simple-yet-powerful 2D graphics framework built on top of Tkinter capable of creating good-looking, modern GUIs, games, and simple animations

  • a good looking modern gui sample code.
  • a simple game (maybe click on a moving object?)
  • an animation (maybe an interpolation?)

That way, the prospective user can see what the lib can do, and what sort of code it required to do it.

Full Graphical Software

Develop an application to fully develop games & GUIs through a method similar to that of MIT's Scratch but with a powerful python API. This will automatically convert code from the 'block-format' to python and vice-versa making it easy to program powerful applications.

Add On-screen Resizing for Objects

Add a resizing function that allows users to drag and resize objects on the GraphWin by dragging their edges similar to how resizing widows works.

Bug: Rectangle doesn't resize properly when the GraphWin's autoflush is set to True and winUpdate() is being manually called.

Even though the GraphWin gives a warning that there might be issues if this is the case, I think it is important we fix this bug. Everything works normally if I am either not manually updating the window and setting autoflush to True or if I am manually updating the window and setting autoflush to False.

However, If I am doing both, the rectangle flashes on the screen and the resizing is very inaccurate and all over the place.

image

This is the code that is being used:

window = GraphWin(title="Resizable Rectangle", width=700, height=700, autoflush=True)

r = Rectangle(Point(350, 350), Point(500, 500)).draw(window)
r.setResizable(top=True, left=True, bottom=True, right=True)

while True:
    window.updateWin()

Bug: Rotation 180 deg causes error

When I try to rotate an image using the rotate() function and enter the rotation angle as 180 (deg), this is the error that comes up:

image

Gradient Colour Fill for Objects

Rather than filling (or outlining) objects with a single colour, add a gradient outline to transition smoothly from colour to colour.

Physics Engine

Implement a basic 2D physics engine to help create games.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.