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

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.4-cp314-cp314t-musllinux_1_2_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nevu_ui-0.6.4-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.4-cp314-cp314t-macosx_11_0_arm64.whl (697.3 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nevu_ui-0.6.4-cp314-cp314t-macosx_10_15_x86_64.whl (696.2 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

nevu_ui-0.6.4-cp314-cp314-win_amd64.whl (670.4 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.4-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.4-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.4-cp314-cp314-macosx_11_0_arm64.whl (680.4 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nevu_ui-0.6.4-cp314-cp314-macosx_10_15_x86_64.whl (682.5 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nevu_ui-0.6.4-cp313-cp313-win_amd64.whl (659.9 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.4-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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

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

nevu_ui-0.6.4-cp313-cp313-macosx_11_0_arm64.whl (671.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nevu_ui-0.6.4-cp313-cp313-macosx_10_13_x86_64.whl (674.1 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

nevu_ui-0.6.4-cp312-cp312-win_amd64.whl (662.2 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.4-cp312-cp312-musllinux_1_2_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

nevu_ui-0.6.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (674.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nevu_ui-0.6.4-cp312-cp312-macosx_10_13_x86_64.whl (676.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nevu_ui-0.6.4-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 697.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.4-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 cc63ad473e6ea0c299206568c48cf6d614fa8974aa3f029bae302028aef0bead
MD5 f0ce7deca9ae389a1686084b6e558f50
BLAKE2b-256 bc7a193ec86d0b8df6e80f36d7ae99840759aea58e767999f099e4a6fff6ca1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 79086681359fca09807f5f7c6f564ac62fec00521fb3092bf6deb5addb3c4aa9
MD5 bbb4e8ee96056ca4e7a4edb9bf5851f3
BLAKE2b-256 345ec30f7011aaade048e65612f5e72229aed5a808924214a9ca84bc4a3f36df

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4-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.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5f9821fb80923781c71119cabd3a0ba1ce50924f43d32c942ceff306a6fa122
MD5 ed06345284d6f93332a68b1894d7c82d
BLAKE2b-256 7fe9efe399e2e469ff5d950f74a75fcbdafd937c70c4d151da48821d5830b8c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd1368b3ff35a5be15254b2ca91028c9ea2afd0f235269ca2d775a0ae94cc177
MD5 2984cc824956b3dcb589af0c35e8bf7e
BLAKE2b-256 63dc92ec9344ccbf3dd8a6a382990c1e20562ee4b924a910082de1237bc1ee9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 430e12f2123f9080dedd800c39a6fa4158ddca623504f33b849382d23a8929f5
MD5 48bace0a2abfc1225a247cc38af22e22
BLAKE2b-256 5b9703873e16c17b19568a47c8cd89e62155ec260e1bf814c4ff26f4de74f82e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.4-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 670.4 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.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 33791941f9c4d8e057ebc0c01f694a9736f920b430bb8dd255c6a2166caf80b2
MD5 c6ee15efa4ab1fd45702de5700ea624e
BLAKE2b-256 33e1d18d25fe3e5562ced48b3ff7b1d9984ea72eca08a8e36adcbd78e49567aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d719698773418ba4c550aa10476c8e2773978fc032f28283125af3298cab75b2
MD5 bbb060ab9214f207e4662acbf7fc4650
BLAKE2b-256 4328141cf6b5ff06f7491fc158220594bc8a0ec995341da782d7b9c22d53e918

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4-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.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b36f737693a89b03c2d2243527bfb5c405c918b91b58e849a6b1fb961cc4de88
MD5 04acafb4ff2e4d7dd5e9f8b8301c1f91
BLAKE2b-256 9425923d7408817d20211c5e6b040225fd3fba84b4c5468cf540b8cb47aa32ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eef1e3812ad162d664a35f127948b762e58dfc60d568b2f6d29f2622b1ad9a86
MD5 61918d370df86b207ae681a072393869
BLAKE2b-256 6b6b3b61bc5907157878b4504371cc51b07fb41609bc9aecdad0daf046ff2183

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 25409a2dfc3bcc2e07ba6047dde03701b0f3cb84b42634841f469731e196062e
MD5 43ea6e6ce7a1c83b24309e77a8a65e6b
BLAKE2b-256 8fefb73502e0d3949921136faf98a86485f0995d269bae63e040415a263e8fb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 659.9 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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5b06a505c767add4de61e8e16802f9ff406dac754ed951737faca64e06a8fa24
MD5 628fbc8320843b4e41072c1a81a8791c
BLAKE2b-256 9c42a5f08166d377d0994194a70e63ef541dd1137efe5cfd0d9f95661ff33f40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3be49b98bfa56e1e4d1dc006167f57b3804ef0406a2473dcab64c505e8d4b2ca
MD5 c66d31c4f0dc68a7e7bd1450c787b9e9
BLAKE2b-256 5b550f3aa60771656dd8307fdcef16a418890f5f790f804744ba1cee42c6ea4e

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4-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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 32f35894ee620dc8b94b6996f1d8a7bc22533dd84c66d8708d21dcce8508f57f
MD5 02beba022d7c9ef7341bc5f3558d7566
BLAKE2b-256 5c50bd4d2e00c43592f3c28a864268e3f0bcce45726a4984b034a711d19dbb34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 512dbcce2a55f490c1e5a4adc2167737f4faa91481bd0a5925859aef33c60413
MD5 29d8a2c1b31c1221307fefe6bdb857f0
BLAKE2b-256 5e1cbb50e741f00cb117f8f46513ab46dc92a3500d66862accddb7f7ac57cd97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9785b9cc537edb167e80c07145c8b5c5e8f1386ce28a925ff59a6a91850c9223
MD5 7e46df8f6260bdc44be9f530314c5c43
BLAKE2b-256 5c273f056e76eee9e28e906a6078e345e7b35ca27d23baf40c700cf0f3276a78

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 662.2 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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 294f07bc8daf8c3d9089fb332a32728ba52f2d5f290c6281ae5cdd9b846c820d
MD5 8a9ab1726d71335d3f14fa1b95c745a1
BLAKE2b-256 cb514f60389968e9896f48dcc40659fa39e6bd5a8cbcd8c2ce332ffdde97eb2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1051791a36055a9e45823a5753a45cd5489aa65981523b895420b3bd6a43402c
MD5 5a2f696d2dc579853d07235498323a7f
BLAKE2b-256 20d1857999f205230a01ce4a3cb04588c60b13148f4490885979f34f089305d3

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4-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.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 43362df594fb292822d62c0b5b5b2e862a8baebdd38b292e20c860d64aba7607
MD5 56087769b9f3d2172629310dcc552271
BLAKE2b-256 8ec119a5efdfd6d2bc756764c9f8957059bf95b892016087b16fa5fb11c0b023

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c4c91f4d0c474ade8d4edf59ff87da08f471dbf8b02cce65dad7b1187db6427
MD5 c7883e9f3d0d398cc55881e7140d5989
BLAKE2b-256 c1f229112fedd8ee2c1975932d7f9fb44032d694641e9da29b121bff479918c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5696436262d421a806855ae50dfaecf483d731d7fa56dfb4c5ee1cc6122bf624
MD5 d39f5d2f847b873c975aeea070b1b043
BLAKE2b-256 05c3e9328704a43fe015383031bcd452ce1c0ca161922bf02ef01af3526c00f5

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