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.3-cp314-cp314t-win_amd64.whl (663.9 kB view details)

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.3-cp314-cp314t-musllinux_1_2_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nevu_ui-0.6.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

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

nevu_ui-0.6.3-cp314-cp314t-macosx_11_0_arm64.whl (666.8 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nevu_ui-0.6.3-cp314-cp314t-macosx_10_15_x86_64.whl (664.9 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

nevu_ui-0.6.3-cp314-cp314-win_amd64.whl (636.9 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.3-cp314-cp314-musllinux_1_2_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

nevu_ui-0.6.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

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

nevu_ui-0.6.3-cp314-cp314-macosx_11_0_arm64.whl (651.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nevu_ui-0.6.3-cp314-cp314-macosx_10_15_x86_64.whl (654.0 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nevu_ui-0.6.3-cp313-cp313-win_amd64.whl (634.6 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.3-cp313-cp313-musllinux_1_2_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

nevu_ui-0.6.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

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

nevu_ui-0.6.3-cp313-cp313-macosx_11_0_arm64.whl (650.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nevu_ui-0.6.3-cp313-cp313-macosx_10_13_x86_64.whl (653.6 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

nevu_ui-0.6.3-cp312-cp312-win_amd64.whl (636.8 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.3-cp312-cp312-musllinux_1_2_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

nevu_ui-0.6.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

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

nevu_ui-0.6.3-cp312-cp312-macosx_11_0_arm64.whl (654.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nevu_ui-0.6.3-cp312-cp312-macosx_10_13_x86_64.whl (657.1 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nevu_ui-0.6.3-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 663.9 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.3-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 ad3bd6d510d9f3b893ed1c3c85c98a28e4db8bf0eb4aea7b01da574bd0efb116
MD5 a4bf156c07ceff26c0a8ae8197026497
BLAKE2b-256 899115824f066a327e516b804db5bec38e878ef6cbdc82f73473d73c270171f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7106129fabb109cd6669d45f4ad387ff1d43f1df8cf6f47cfb827d62ab741c52
MD5 27d24241eccd449875bff39fdb3f8831
BLAKE2b-256 185554239a85d50ca1f0ebe7308a3598efd2f787d23311c82c596b4799895be4

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-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.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2c2b489ad1a7eb0934d6aa33c7297defa6c8516bb8ed0b26fa80e7fb122fbc1a
MD5 fd21cdcff6bed17316df3f4e48ba32f1
BLAKE2b-256 0205ebb3dee7efdf24bc2de8b2da6f99dce76f6505578cbf7c97ac86b0ad809d

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3fff4f076f873c78b4ac0495e8e38334bd649c0c1fbe32366341168ac6f252c
MD5 190d888cc29896572c6dfacebdc3c77b
BLAKE2b-256 2a3fb0aa4ad452149540b676de232c7dc7dddadc8ec5e47d818852c109da4280

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d842508d293f80e0872474e123c4886b350fc6aff27bd2ded41b28f0c84bd912
MD5 852b3a49b34a3a017cf264230e78689f
BLAKE2b-256 6e9f2cacb2b7b65c5b93c0f0e548df9442272668d90d99a8d36be3a05a968dae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 636.9 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.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 0439d491d46fe0ae47b3274038b3c66e12635da1401c1bece595e9dd9a3b50d9
MD5 746d0ca6ed1aa232837082c368ad1d63
BLAKE2b-256 77eb5a9d230d8e674d015031adddd9b517009adb5a340c6b6c4c433d972c20ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 46a4f0ce74d927896f9be70fa773d5be9234ca01641923866a43c9112e81a387
MD5 5220fb6128294ae564282a7931db7d7b
BLAKE2b-256 3514804088b3a1d17e2f311d5015f08457c68e8d673706f8c9ab8e38218f365f

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-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.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8a78f5933ad366c5d45410b3ce349c402727f3ce6614f3cb8d63e13c0d5198b3
MD5 d77c4d66db7c6f18a82ecb74c3ed04c5
BLAKE2b-256 427fa7c9f9c6295d365634b5e161ac76287a8d5d7c916a781e4c72c753f30ac1

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7b76d950329b3cf1334661b45f1a808305cc9f25b7cc60acaddd99dd20037ae8
MD5 0a2f16577e364aee437af1cc9ea610f9
BLAKE2b-256 834a691328db5e0d219a9680a333b5f39b159d732d65e950f9cfe3e13b8ab7d3

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 790d140d093c8c3f1e4a60cfadd2827189920462185360e96e39b5621ea8fb1e
MD5 a3921efce91661866613437a96014f7f
BLAKE2b-256 a797a33f06db6bc919ab9e0dcc57b04e8be2444463775cd5d39f65b5cc132502

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 634.6 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d0cf43fec5adf423fecd66fc220fdda4e4003ee4a8222edba1f8a8722e4b459e
MD5 fe5e10c5e77ba23d1deb7342b2c46dce
BLAKE2b-256 b9aac6574f42fc56652e4a7c721a67b683a942b0be319246c9862cf5a0e5ecc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4d8145a280e51e9243396e29ca87716839d32e6137583f1996f053de0deca656
MD5 a1f63e84b690791f674327141db6cb18
BLAKE2b-256 a41c6c9202054b8362ce3deca05f23f8c92e55c5959a6c8891ba570dd6d76581

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-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.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1721f6ab11f9289d6a86eca1852ac5483b962a3fed542d7b751688865a32542d
MD5 6112ef231c45510927bfc8caa9f5cd49
BLAKE2b-256 7210d863a973a516b75c12c344957c9863717e325a4c9fbe67a88d492e0a21f0

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 45c2ee4c94c347800a4eb7853142f39a0f844ef7debfc942ad6158b05f6c662e
MD5 f6e9028eabc61f79c25fd51cce017a0d
BLAKE2b-256 3521bfe6b8b22f02b050dcab7db16cf9696654c42b5c11be6da6f53c6a6b09e5

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 961b1dbc6bb9e6ede1115cfc3f2b27b57b8f906a8004bf954e33adae95dccfa0
MD5 f8228073e73e98f3ca19bd072870008f
BLAKE2b-256 6609a0aa7778009ebaf1f14db4b95b3b6821c4ec98e59ada517076c52c509e96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 636.8 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 edc8b7a7a1b398e6c5fb6a281f2d8160b10d6100bc715b60d7e648286efe79cd
MD5 e7051a2099ca81dbc302cfd92b63f5a6
BLAKE2b-256 7c44be40ef6f450adfdcfd2323e5546c56bbc3fcb1f5bd7b0bec7a364025fa90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 645d55ec021e3cc939a634e56ea80228223c78c1eb161091e0a9e6d8b2c9b978
MD5 aed5f6f8582590036e32a274ecabe919
BLAKE2b-256 371992fc5ceed03909541d46558e0a059b603e3d24ca294fc45488a5d5b62ee1

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-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.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d2b560f8b9db33a339e078a57341582e500ec9629812f3e424177c2851221400
MD5 1f18c997c2264acc0053517c7467e07f
BLAKE2b-256 31f443827391b587ba1f0024ade50a6ca838609378e3e37208c2c22520a14a76

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a8d410040a069f2823ad7a3ad22185549f1e3bed3f2cebcaf06d10a5c6baa03d
MD5 9143c33464110c4ffce857dfab468852
BLAKE2b-256 8174465c8cbe3518a2f594bae601e502340462bf5d424a0138406e70e1fe5f09

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.3-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.3-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c902c1a04eb101975e54b746bb23dc4883c3e065e34bbf4bc8ee44929090a3bf
MD5 7b120afbfb9afa5ce8b17b4b05cc8d24
BLAKE2b-256 e4a7ec4cd1ec2b35603fe3f316dca673986213240810d399b7691b85ec45b213

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