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

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.2-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.2-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.2-cp314-cp314t-macosx_11_0_arm64.whl (642.9 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nevu_ui-0.6.2-cp314-cp314t-macosx_10_15_x86_64.whl (640.9 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

nevu_ui-0.6.2-cp314-cp314-win_amd64.whl (613.8 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.2-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.2-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.2-cp314-cp314-macosx_11_0_arm64.whl (628.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nevu_ui-0.6.2-cp314-cp314-macosx_10_15_x86_64.whl (630.3 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nevu_ui-0.6.2-cp313-cp313-win_amd64.whl (611.6 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.2-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.2-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.2-cp313-cp313-macosx_11_0_arm64.whl (627.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nevu_ui-0.6.2-cp313-cp313-macosx_10_13_x86_64.whl (629.9 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

nevu_ui-0.6.2-cp312-cp312-win_amd64.whl (613.7 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.2-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.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

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

nevu_ui-0.6.2-cp312-cp312-macosx_11_0_arm64.whl (630.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nevu_ui-0.6.2-cp312-cp312-macosx_10_13_x86_64.whl (633.5 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nevu_ui-0.6.2-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 639.6 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.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 9b0c4930218c8a023a7b28f72ba9d1de8c6777f15fa8453ce3fac751312547cc
MD5 857d22bc433d23026349bb8879182336
BLAKE2b-256 083327f6ec7640e03e0d6e0eff00c35d66b35ac8215ec716cabfc70a2be350d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2ab99ce4f7a7235f246c2be1eba0a25d8a9169b28e52cdc46e165ced03df33d5
MD5 c3f565a3d682cd6df723d02fbef3a167
BLAKE2b-256 2c9876cbf5650d28f7efb62152ecf55cd5bc7fe818624232f343ca1d5acf2616

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.2-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.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77210c4d82e1d530d6579ecf7c3123e1538fffefb32006b7e7334c72239e11b3
MD5 67d501a17aa8c1d523db5a283c6ba8b5
BLAKE2b-256 942acca1ac7f1c1ae3d4e6ccb6db5d9a1450845f436978e3c9441b53471220f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b496763e8419ae6cb2306e682aceb95025f77e0cf5acf124e778ee616142cfa
MD5 bdb0d127ebefa36ba98d4dcaed76c8b3
BLAKE2b-256 2000c8cd44c23d90ab6a686a18043971a1d629a7a2cf3cf8e14a2f856d0c6d87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f88eaf6a209594bb581bf5986a555b8954642ece994657daeb3f7eb2ec26df4e
MD5 f5967c76ca630c76fb15127ec58ea8e6
BLAKE2b-256 cf4c60acedf47a58ba02f972e9b775e140aed854d554c18e6aab694803c2890b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.2-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 613.8 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.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 997a24d4218b00fe69bb8465cf3dd435e9d84d18cdfc62f9fd5c663f64987684
MD5 eb3a3d3c2034e7596a2f8fb4dc54572e
BLAKE2b-256 fd8b277fbe72cc86d18c1510d6ea342122f2be8a4dc233380733b40f5a1a73c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d0a82d66e49582574ce56ce766531b721634be8c8de19fc3abe7c52d056f0341
MD5 eae3a5dd7a89954945e098f375616e15
BLAKE2b-256 8f776daba613bd9b99d23f3d5102b01c708e128c5840971eff65723c81479125

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.2-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.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c08c6f98eda8242acb191b6207572728b534b18ec3bc569e25c79b8825fd5dc
MD5 40bdd784be97c1e80a81955143266b09
BLAKE2b-256 e874c336a6077d333159f8c9d251b06d92860b01d00f5a7ee19ace827a04d18e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1634f06c7dbdded2e64d65e139a60df1c9c3cd305f9631af6a09b8a2e1075e15
MD5 75426f44e47e3c22e0570dec087bf4f2
BLAKE2b-256 dbad03128cb9e93012331cb588782f330f5b8cbc4381b82f14105cf5c44c683b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f14d287b0e00cd4eb1da451656cd2650ca802fae496ada2a2f954317f26b06a9
MD5 b0816d2cdf7086699ac83330860fc4fd
BLAKE2b-256 07caaf88fceadc8d8417c7623c2a45c28226413643401cd591e0407039db8802

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 611.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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 66e99dd403214a1e15d919b1352f9d67250d283f8f3600d79101c5ea856b3eab
MD5 f099086edf653837cef6fe4da4b1ab4a
BLAKE2b-256 d44f5565d9a41982f9fc147941075b0bd935b0aeac450498c1a0202eee1b73bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 751c32c92b8c3913cb5ecf119561745ec15f590039682e9de82e67e783684756
MD5 b771755690326a8e68711b1bc97866b9
BLAKE2b-256 a5df8565b7e58e6dc5acdd99116e8bb38fd4bb4ff354b1ca475af12630fdc9bb

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.2-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.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fac208338e904a4ca6a223f441df1ec8a058eae3177a7078e3f70549c77059b5
MD5 b1caa2bef2f4d8005473a6bd49665a94
BLAKE2b-256 c7b1e6248e5e98cdb937405f673a772b3ee5f8c65040cf16d221f79339fb3599

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6bd635868166d09f355fa6cda1a6db383a997a8a1dc2f2256cd5b8b39775acde
MD5 d95796ded044ca1fd416701ff6fc184a
BLAKE2b-256 a50f485e1707a7a6d67dd8ddfa99a2fb192566f19f148b02ecc1ed0b0f6ae99c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4fb15bbdb6e2ded27eef1c9eefd439832d8e1c382afb716f2940f091f09875a0
MD5 162cc05d2de9273abad961f50957a6c0
BLAKE2b-256 97d38d152653a65722466c5e9e3782b2f3d236ce82f84cc5216d3d62fe5b042a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 613.7 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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bf173fff0e0fedf7907777febd57efe76c1d08b816fd42dcd4efe44fbd5d527a
MD5 0ef9453888705d0598073633195a91ba
BLAKE2b-256 32c07510410289bc8e00eca994ba8103d2cff9c0dee518ea709e772d7f774287

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d83f50a2cf34a6532f49a0386bb5543d0b1999dd67068d67aaf60bd13645e2e0
MD5 61c1a26cf5a2d025d03a99a1437771f0
BLAKE2b-256 492c6968f1a7ddcc06d0c0ea27249f042fc1707200fe4e87c6c43d6875e98892

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.2-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.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b5db2b8e8c5f91ee368e0364fac46880ecc001d4721407d07330faf6b0d786d
MD5 96926fac02c421c6e2923d70e9c2aea9
BLAKE2b-256 b6413c69dc078df8e22a80cf1d309471ffe90a600e7c77d0eb31167313f339d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a3ee924a2eeb41a8de45f57f79593bdd24c813ec49d535b5c42080f336ed1eb
MD5 eba318c917055c495693eabb08b2fc16
BLAKE2b-256 8a1c3cbc33a7153dc972c897e204e167323bda7c2e6845b3299e2bc68bc7ed3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bab6d135185cb1aef71cff03535e76b18b37a75d303fdd48af9f922d7f9f0929
MD5 09295b120b0ed72e465699c9bc2fc4e0
BLAKE2b-256 1eedb1cfc85a11c88d21230c506ddf6391ceacb4418a0d612287c27d809a558b

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