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
  • Scrollable
  • 💾 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.0-cp314-cp314t-win_amd64.whl (647.2 kB view details)

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.0-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.0-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.0-cp314-cp314t-macosx_11_0_arm64.whl (650.5 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nevu_ui-0.6.0-cp314-cp314t-macosx_10_13_x86_64.whl (648.0 kB view details)

Uploaded CPython 3.14tmacOS 10.13+ x86-64

nevu_ui-0.6.0-cp314-cp314-win_amd64.whl (621.4 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.0-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.0-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.0-cp314-cp314-macosx_11_0_arm64.whl (636.1 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nevu_ui-0.6.0-cp314-cp314-macosx_10_13_x86_64.whl (637.6 kB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

nevu_ui-0.6.0-cp313-cp313-win_amd64.whl (619.1 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.0-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.0-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.0-cp313-cp313-macosx_11_0_arm64.whl (635.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nevu_ui-0.6.0-cp313-cp313-macosx_10_13_x86_64.whl (637.5 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

nevu_ui-0.6.0-cp312-cp312-win_amd64.whl (621.2 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.0-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.0-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.0-cp312-cp312-macosx_11_0_arm64.whl (638.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nevu_ui-0.6.0-cp312-cp312-macosx_10_13_x86_64.whl (641.1 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nevu_ui-0.6.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 647.2 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.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 c869f174081042a4d998fe931ddc15a42d1d287f6581755dbd72d4125e0f8653
MD5 cbf4e646f3a32d6f111e6900c89901ff
BLAKE2b-256 25880d78efed2108e3df57e049498976118a50a39ef6c6dbbfb3dbea88acca04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4d194a7ad344f2031df2d867d8526ff88976cd9113037b40d3b5516ccf2e858a
MD5 455a6ad3909abc44d300f0b4b4444a33
BLAKE2b-256 55b9fbef64c5cbec4fce69bb620e2f54ba69573204ef1f82e84ebf1a6c01b785

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.0-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.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38b024310857f256a3302728012b094e2dab350bd06322cf89f23340e87744cb
MD5 226272100f37555ea9a0328f4a38d332
BLAKE2b-256 e1266dba6a5556bbd7bedc45bc06bf0549e89c9fc902b872842d48ef9f939044

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ca3e409c85f1221b2a5dc9a46cc17812bca8dec623eea29425eec5662e00ee16
MD5 59eec035c5bcaeb5346942a6de75bb67
BLAKE2b-256 d26dc7fbb62dc2b5d3ba47a16aeaa2364f050f0f40553db9ddb8c4b49e9355b6

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.0-cp314-cp314t-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp314-cp314t-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 96c2b1970c66d09c0e3088ab13f357c11da4a9d94c509ad5a930ef99e12f0866
MD5 018144118e3ec27a2324b809096862e1
BLAKE2b-256 261eaa2231542596c371abd67d0420374ee3755d5648103669312793346d9f32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 621.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.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 899d40dd9e5215bf6d178e3056789708381c7a82469be6d32873e160768696e0
MD5 66d3bb55080912dfddd09085d90e8ecd
BLAKE2b-256 45dedcdd676b758e8f93657462e5aaec5012746b992b63bc14c62c4592c7f52b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 407f31af36777f8eea1da0a837d6cc55cbc218b6de1fc0a2fb37ea58e2e00c78
MD5 aba6b41842e0798b8f369f3632780281
BLAKE2b-256 73e0182d3801e6217853ca53af40380f43cb99d3b2eaf210fcaadae28c6ad986

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.0-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.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3c4e3232e4a4d7774051fd635b1c2669bcb84098393d4c68474a0960e6d90e7e
MD5 7f7557bab9f567d4d575ea897fd4e882
BLAKE2b-256 efb72ef0b17c59a1878214d72383103acea3a82b3b4932df06b318e4c1875aa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba6dfa56d4c1de953ccd0df4c25858f6eeb5452698ecd2b9bbfe470a0cf41455
MD5 3476bbad2fdbfbc0890b9b10359059de
BLAKE2b-256 550a56d2578b2192262f1b068c0313b856e5becf2bb7aabfe71aeeb1feb70106

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.0-cp314-cp314-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1d2ab082531d735bd10e17f3e163c7b9b2f424c7a21a9ae6bb427df244bb5af9
MD5 ebad0e3f6e8d313260757e62eacd53f6
BLAKE2b-256 d4c6f513f3442e3602602cfae5a584a1e8c55b96c979cefeea5e361bbc296cbc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 619.1 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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 10a8e3bb2e21420715b3749f77dace57c582fac26bad5cd26931e4a972b66491
MD5 f3c66f7e0f5ffefd1e76af14c8f5ceb2
BLAKE2b-256 ab2aad5f65db36143817a869a3255600edb4335a22e3bd5a01a604c8b60aee09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3a89c6fcf8d66fbe5cfef32e6424d84853365d74adf58b1626aaf425936feaa3
MD5 594985daac3f328a104ad4bfac4a6d76
BLAKE2b-256 067763bb951dac72091fd4bf9c6f972bb33a9df8f22b3d95b0fe790079c56ad9

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.0-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.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 55255991b70281bdf32de4dc229b0b06716b52373e45c388e2b7d845645c7731
MD5 92557d37b8f412982b1509d669c7214f
BLAKE2b-256 2ee8fda96d12316e7263d9f9626a0517601cfe8f36e9f0a655de3239af5bc50e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7827061c1718e919f1a9c4579c9650a5e9c592eed41af16384425dceb7b93a4f
MD5 d0226e0f313b7fd94c46bcd04b8ee09e
BLAKE2b-256 b5d85350c79f5f4c21d4e59746ce7f3935cb8767bbb53a7a8d702e655b935504

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 00cf28a91e22156ef71e6f7b169bfceac3cc08b857a04beac070e067d23363df
MD5 8cd28fad5ef7203b947f91aa3dc41f5a
BLAKE2b-256 b8eb29f9d0c9a23f017a93eb237085c0c15cbbb91d96c71a85563094657a98d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 621.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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e207eb49071b74762f10e80bb9b8b7e5ac8f6b320963d0ab918f918de5abf9a2
MD5 46475840b65d4d541853fa9350baf08f
BLAKE2b-256 f25cbf7fcb90a33409de3cc430af8f2b1e412257f933a702876311ae7b1bd1bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 82b3970f30a3cabcf0f0a264d8809e4808f0b3e2a74a1c4a4282acd2517b3419
MD5 21869b9a9a271b5475b5d6723ab0453e
BLAKE2b-256 0d36133d5e9ce8d08ed38c7318f155051441fe1fc6ff77649f2579ec42af12f6

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.0-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.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10fcb651900bea34c297b64a0e822f8c284b0fdd4ea12edfc192f7af79d62e6a
MD5 5cf3db620f51fc428e58b004ad5d1be7
BLAKE2b-256 9459b4ce5920362a12d9946811b387a9744b2fa7f5724e8fac0e236074c28060

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7cd83c2436761c516e82cb8af0744d70f86f8a7577394761dc36b8262b10d67
MD5 6d29dcc253d85df02412d6cad0377d05
BLAKE2b-256 cab1c02531d37f6beb825678f49d1c2b8464c01644dbd60aa350fb2e1b7db360

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fbf36a8c98841e5b18f28597d85bf33e518c03f2119e5db1ced1e52bd4876135
MD5 a459601f82ccdfcbfa1d6b89c9714ef9
BLAKE2b-256 581ad64b7b237c78d1eac7f7c4e9ec48857c5f7f085c602117e22c4e934c7b26

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