Skip to main content

A powerful GUI framework for Pygame that allows you to create menus

Project description

Example1

alt text

Brief Description

Nevu UI is a library for the declarative creation of user interfaces in Pygame. The project aims to provide developers with a set of ready-made, stylable, and extensible components for the rapid creation of modern and responsive interfaces in games and multimedia applications.

The main goal of Nevu UI: to make creating interfaces in python even easier and faster

Key features include:

  • Layout system: Convenient arrangement of elements, for example, using grids (Grid) and scrollable containers (Scrollable).
  • Set of widgets: Ready-to-use elements such as buttons, input fields, and labels.
  • Flexible styling: The ability to customize the appearance through a style system that supports colors, gradients, and borders.
  • Animations: Built-in support for animations to create dynamic and lively interfaces.
  • Declarativeness: Support for declarative interface creation

Style

Style - a universal storage of parameters for customizing the appearance

Editable parameters:

  • Gradient
  • ColorTheme - Analogous to MaterialDesign
  • Font name/size
  • Border Width/Radius
  • Text Align X/Y
  • Transparency

Main Features

Nevu UI allows you to describe an interface with a clear structure

Examples of declarativeness:

  • Declarative approach: Describe your interface just as you see it.

    # Specify content directly when creating the layout
    grid = ui.Grid(content={(1,1): ui.Button(...)})
    
  • Adaptive size system (SizeRules): Forget about pixels. Use relative values that adjust to the size of the window or parent element.

    • vh / vw: Percentage of the window's height/width.
    • fill: Percentage of the parent layout's size.
  • Powerful style system: Customize every aspect of the appearance using the universal Style object.

    • Themes: Ready-made color themes (synthwave_dark_color_theme).
    • Gradients: Linear and radial.
    • And much more: Fonts, borders, rounding, transparency.
  • Built-in animations: Bring your interface to life with ready-made animations for appearance, movement, etc.

    widget.animation_manager.add_start_animation(ui.animations.EaseOut(...))
    

Installation

Dependencies:

Python >= 3.12.*

  • For Building:
    • setuptools >= 61.0
    • Cython
    • numpy
  • For Running:
    • pygame-ce>=2.3.0
    • numpy
    • Pillow

Installation via pip

pip install nevu-ui

Examples

Example1

Example2

Пример3


Basic Grid

Declarative Approach

import nevu_ui as ui #Import Nevu UI
import pygame

pygame.init()

class MyGame(ui.Manager): #Create the base of our application
    def __init__(self):
        window = ui.Window((400, 300), title = "My Game") #Create a window
        super().__init__(window) #initialize the manager
        self.menu = ui.Menu(self.window, [100*ui.vw, 100*ui.vh], #Create a menu
                            layout= ui.Grid([100*ui.vw, 100*ui.vh], row=3, column=3, #Create a grid layout
                                            content = {
                                                (2, 2): ui.Button(lambda: print("You clicked!"), "Button", [50*ui.fill,33*ui.fill]) #Create a button
                                            }))
    def draw_loop(self):
        self.menu.draw() #draw the menu
    def update_loop(self, events):
        self.menu.update() #update the menu

game = MyGame()
game.run() #Run the finished application

Imperative Approach

import nevu_ui as ui #Import Nevu UI
import pygame

pygame.init()

window = ui.Window((400, 300), title = "My Game") #Create a window

menu = ui.Menu(window, [100*ui.vw, 100*ui.vh]) #Create a menu

layout = ui.Grid([100*ui.vw, 100*ui.vh], row=3, column=3) #Create a grid layout
layout.add_item(ui.Button(lambda: print("You clicked!"), "Button", [50*ui.fill,33*ui.fill]), x = 2, y = 2) #Create a button

menu.layout = layout #Set the menu layout

while True: #Main loop
    events = pygame.event.get() #Get events
    window.update(events) #Update the window
    menu.update() #Update the menu
    menu.draw() #Draw the menu
    pygame.display.update() #Update the screen

Example Result

Example1

Nevu UI Status at the Moment

Layouts (Layout_Type)

(✅ - done, ❌ - not done, 💾 - deprecated)

  • Grid
  • Row
  • Column
  • ScrollableRow
  • ScrollableColumn
  • 💾 IntPickerGrid
  • Pages
  • 💾 Gallery_Pages
  • StackColumn
  • StackRow
  • CheckBoxGroup

Widgets (Widget)

  • Widget
  • Button
  • Label
  • Input
  • EmptyWidget
  • Tooltip (In 0.6.X)
  • 💾 ImageWidget
  • 💾 GifWidget
  • MusicPlayer (Will be reworked)
  • ProgressBar
  • SliderBar
  • ElementSwitcher
  • 💾 FileDialog
  • RectCheckBox

License

Nevu UI is protected by the MIT license

Additional Information

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nevu_ui-0.6.6-cp314-cp314t-win_amd64.whl (831.0 kB view details)

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.6-cp314-cp314t-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nevu_ui-0.6.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nevu_ui-0.6.6-cp314-cp314-win_amd64.whl (795.6 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.6-cp314-cp314-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

nevu_ui-0.6.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nevu_ui-0.6.6-cp313-cp313-win_amd64.whl (784.0 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.6-cp313-cp313-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

nevu_ui-0.6.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

nevu_ui-0.6.6-cp312-cp312-win_amd64.whl (786.0 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.6-cp312-cp312-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

nevu_ui-0.6.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file nevu_ui-0.6.6-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.6.6-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 831.0 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nevu_ui-0.6.6-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 b17aed554607fdb9efdf6093e4b81e98853fcb92624d0438d48629336a174e98
MD5 2a1b2501d59363ea33dc1b0b29586a49
BLAKE2b-256 ed1cf4fa11c601e0a75da4bf2a08c1c9e205c64cdc6a86bdd67feadba82cfafb

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 216cb078ee258738742dd63c5c00d362a4bde1a0f3e9fbc777fdf99a1fada7fe
MD5 bd08e04aa759afd989e0622fafb4b91e
BLAKE2b-256 3aa0d96dd5d6e82a9fe8da8313c163369181cda03870435ad0dc24f7c79e3df7

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f83d56e547e63538df3bc99042516a1c8aaadcd7068ee1d57964e09fcbf9f79b
MD5 856623f7b6ae8bfa4743f45e93fd2a42
BLAKE2b-256 de1a8158b6ad507c569dd420d8cdf99f11d2d326d6e9e18850b4bf3b37f60bb3

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.6.6-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 795.6 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nevu_ui-0.6.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8867b8afe17b8e49b0df7c897c45447dc5c73475a666112574a8cb959fc41f1a
MD5 82c36c0a9e25a4a015460bd6fcd7d79c
BLAKE2b-256 c032e686c5caa5a03efd854213edb8ae8e57124ba34cf016e383a41e4ed2dbf8

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8b505b3b262bc4fa43a693debf42f782ccebfe8b47707d237e7bd9de177eebbf
MD5 5c3c15a5a769e2a037ae5ddd54bc005f
BLAKE2b-256 fdc98065859c1e43c0b53cee4d6f24277310aa69e074aa357b0e100c364ddf67

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7398a4396bb148c3901020f65504ba656335fbb5cedf032d4977018f086e3867
MD5 c658765254da5fc79234e25cce7ac396
BLAKE2b-256 6ca810b7b37b12e2dfdd366699a6401412e857d0414d88716c881f58a337d1d0

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.6.6-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 784.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nevu_ui-0.6.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bcc0b3bd36f90759d8034b2f84f0a23b810e1495d67956a752a4e9081d5ad946
MD5 d00366562f2ae96991813b5623802f9d
BLAKE2b-256 229760005403d2ee834ae935b6921335a008bc0d7e602b421ca2d621395343c2

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4d0dd2ab3ef1013e971ba759b430d098ef9be5cc088d080771557b5929470fef
MD5 a7f31d5f10049d6189dc151bb7726073
BLAKE2b-256 354dad5c324608be621968e5ec776b887c87e8f39963363937d1bae5f58e1054

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 daa52bfa1847ea5ccd46807fe696e6da3e4f4eca9a726f5c8969372c259a8674
MD5 258939d39a92f4eb7a6e40f0bfd5d626
BLAKE2b-256 6797c68564b2bd71e4e7e9a6fc2767c0bc0400c6487c928320720b8cf76d054c

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.6.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 786.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nevu_ui-0.6.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 581ebe076a3203c63cdfc7e0e97213173e1aa7acacea8752c18e110bebac227e
MD5 840633771bd87543882238c622c36ac8
BLAKE2b-256 818059ae28d2a592581f40c9d39fa9ad70569b727e45fcbe824a39102faff841

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4b9442c819dc91f24a52f20733d8e85383dab05dab6c1e92edd803b74eeaab92
MD5 371f7148c40783c2d79518a083d7de62
BLAKE2b-256 f191f1e60cdc49b0bf857d2851fee619eac5b23af7628bdc6aa7718dea4fcbd2

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b92017d57c617d24f829ecbd15d8e9c305540868b5aa4386a03f202e25bc6da
MD5 bacf19ace296a46c9da82f274c5689f2
BLAKE2b-256 b540a8ed76f772100c65215e3e98c50d747af55faf8c8145a6a947fbfe3e16d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page