pygame_gui | A GUI system for pygame | Game Engine library

 by   MyreMylar Python Version: v_069 License: MIT

kandi X-RAY | pygame_gui Summary

kandi X-RAY | pygame_gui Summary

pygame_gui is a Python library typically used in Gaming, Game Engine, Pygame applications. pygame_gui has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install pygame_gui' or download it from GitHub, PyPI.

A GUI system for pygame.

            kandi-support Support

              pygame_gui has a low active ecosystem.
              It has 502 star(s) with 59 fork(s). There are 19 watchers for this library.
              There were 4 major release(s) in the last 12 months.
              There are 42 open issues and 221 have been closed. On average issues are closed in 101 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of pygame_gui is v_069

            kandi-Quality Quality

              pygame_gui has 0 bugs and 0 code smells.

            kandi-Security Security

              pygame_gui has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pygame_gui code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pygame_gui is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              pygame_gui releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              pygame_gui saves you 10028 person hours of effort in developing the same functionality from scratch.
              It has 25428 lines of code, 1747 functions and 132 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pygame_gui and discovered the below as its top functions. This is intended to give you an instant insight into pygame_gui implemented functionality, and help decide if they suit your requirements.
            • Redraw a state
            • Blit text to surface
            • Finalise all the images and texts
            • Finalise the text surface
            • Start the dropdown menu
            • Calculate the size of the options list
            • Rebuild the dropdown menu
            • Gets the start percentage of selected items
            • Rebuilds the theme data
            • Set the image
            • Returns the closest shadow to a given size
            • Move the element to the front of the UI
            • Called when an event is triggered
            • Return the width height of the text
            • Create a tooltip interface
            • Update the shake
            • Add font paths
            • Rebuilds the background image
            • Rebuilds the image
            • Rebuilds the contents of the current theme
            • Process an event
            • Redraw the given state
            • Rebuild the base surface
            • Rebuild the widget based on the theme data
            • Processes a keydown event
            • Rebuilds the widget
            Get all kandi verified functions for this library.

            pygame_gui Key Features

            No Key Features are available at this moment for pygame_gui.

            pygame_gui Examples and Code Snippets

            No Code Snippets are available at this moment for pygame_gui.

            Community Discussions


            Clicking overlapping rects in pygame
            Asked 2021-Jun-08 at 18:40

            I am trying to make a simple game with pygame, and I am running into the following general issue.

            Suppose we have two sprites, call them sprite1 and sprite2, each with their corresponding rect and image attributes. These sprites are "clickable", in the sense that when the user clicks on them something should happen. I usually implement this by adding the following into the game loop:



            Answered 2021-Jun-07 at 13:01

            You can create a list of all sprites in order of z-index/how far front they are, starting with closer sprites.



            Pygame, restarting game results in program closing
            Asked 2021-May-21 at 19:14

            I know this question has been asked before but I'v tried different approaches and I can't seem to be able to fix it.

            I know I have to reset my important global variables in order to correctly restart the game. The reset of those variables is done when lives == 0 -> I reset the global variables, main menu becomes True and Game False which should put me back in the main menu.

            However when I run my game, as soon as the lives reach 0 the code finishes and exits -> Process finished with exit code 0.

            The issue must be in my while game loop but I'm unsure what I'm doing wrong. I'v also tried wrapping my game logic in a function, this seems to mess with my game since I only get the frozen state screen, no enemy spawning and not able to move.

            Any ideas what might cause this issue?

            Full code:



            Answered 2021-May-21 at 19:14

            You are setting game = False, but using that in the while loop. As soon as game is set to False the while loop exits and the game ends. If you want to do it this way, use another variable in the while loop:



            Pygame-GUI module: How to create a transparent UILabel
            Asked 2020-Dec-07 at 08:18

            Id like to create a transparent background for pygame_gui.elements.UILabel so the content can be displayed over an image without a coloured background. Im using a json theme which is best practice for pygame_gui, the key word being "dark_bg" to enter a hexadecimal value. Ive tried "None" and " " both dont produce the desired results and there doesnt appear to be another key word that allows for transparency. Any ideas?




            Answered 2020-Dec-07 at 08:18

            In pygame_gui, if you want a fully transparent thing, you enter the color as "#00000000"

            Each two digits represent R, G, B, and A (alpha, transparency) successively.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install pygame_gui

            Run this command in a command prompt:
            If all goes well you should see a message about game_gui being installed successfully and will be able to find pygame_gui in the list of installed packages for your python interpreter (PyCharm displays these as a nice list under File->Settings->Project:project_name->Project Interpreter).
            Should you need to delete pygame_gui for any reason then PyCharm will also let you do that from the same Project Interpreter settings window using the red minus symbol button.
            Run this command in a command prompt:. Or, you may be able to use your IDE to update the library (PyCharm lets you update modules in it's interpreter settings).


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone MyreMylar/pygame_gui

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with pygame_gui

            Consider Popular Game Engine Libraries


            by godotengine


            by photonstorm


            by libgdx


            by aseprite


            by BabylonJS

            Try Top Libraries by MyreMylar


            by MyreMylarPython


            by MyreMylarPython


            by MyreMylarPython


            by MyreMylarPython


            by MyreMylarPython