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

Uploaded CPython 3.14tWindows x86-64

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

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.14tmacOS 10.15+ x86-64

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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.15+ x86-64

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

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.4.post1-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.post1-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.post1-cp313-cp313-macosx_11_0_arm64.whl (672.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 6e79cfdc4a746152ac192330f90f45656bdb3bfc0229913a8635bb26c524fd4f
MD5 c1f9b70552399468bcca2b08ad43c9f7
BLAKE2b-256 626e18791c7252329861c59cf0715a99cdb10bff4ab72e69429ec58965c7d4b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2c454af262dc38f0425f0368bc8818dad51b875f615c5fd97d24e2bf1b09d69a
MD5 c2c4ecb3d67d325b6a203203e1538319
BLAKE2b-256 d7c043b74ea8f266666ada01445277e67bc521359a6f8cf837fdd8b1815dd345

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4.post1-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.post1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2171372620c5ff799fd02caa48c3dbbd3737e13e6ba72bd6b278ef8d0905c65d
MD5 d445573e7080cc12e037f504fff5034e
BLAKE2b-256 917af4cb4b69f275ef1636c661f6556823ea3362a41cd61d1879b07b9aa5bb6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbdd8e98859df68dd06d8095c5066c16d434665daadec4e1415e88df270c9d09
MD5 4b9f7d997a00600ca39db96295ae09fe
BLAKE2b-256 a1c3860ee0040e220a37a27473b6400e870f5a26cdfd670fdbc5964456cd5162

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a7f4c0c35bf089dddd651092ad713fe156abd5c52884bb7bcecf59f341b979c3
MD5 d1ca8b15dc04fdbe227f97da2fe5569c
BLAKE2b-256 ca9328fdf25eb4ce11ad607bd8b90f9d01361116654793edea380639c63fcf94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4b016953d7736524f1754f903fdd6f414969d826f6d8898cafe17360da983828
MD5 75d1866be29e6059f25bae24aea462c3
BLAKE2b-256 04ad6f16a552e42afa99eb7b31e0c433d51acbe51b6da23aa7e95fb7c513d1ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 de9c89439175fbc0b6d1a101a17b3be10a72586ba02902976a7168d1f96cb53c
MD5 c6435cfe4c29f8f7a019da0cd796db10
BLAKE2b-256 88138f3bae9e53b42e8c11eb8f98f5cfb833e4f29ffa3ac893444fdf1b7b1566

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4.post1-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.post1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11a4001178f96c1e5ff03e0783e8aef9d236a5ab3f40d6df9d80b71bfe333a5c
MD5 c2056f32f144393c20a3086ee525a0f1
BLAKE2b-256 d71da57c76c971426307a8b2d65a05d6994f197352a5c1b84a2a15590758f14b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f92c6a0c72a4fafcbbe3bed77525ba8297d7ddf32087caabfb05d44e91cef50
MD5 2e393dabb3b48a8c517c9018ac0694ae
BLAKE2b-256 af19d7ea4e7e2ac951d2ab1d2a36cec0981cc3272f5a16e7902478710d802a7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 81cc90dc3443a02f043fec1ed658e492089f825b60cc57e49a8f6363da5e26e1
MD5 cd8280fe46c7b029cc6b39f6279e14fe
BLAKE2b-256 b23e652292f54f702e111a7b4aa9b3ed6cdc2ce9bcce2b5cae1d6440e0be9956

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c08719bccfeace1a667a4eed358fc0e7b56c3bf4e4458a3cc24030c2f613b4fb
MD5 1ce853796f6bbdb1b88520b5ab81365b
BLAKE2b-256 b8bd9e1c5fb5d3e621d662a88d1fc6df870b32bcc092a992b9d810ed213df38d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 08eef321c5e2b2b24fd9a6ceb8f46e0a7c1bac4daf1188893b46599726d52ea3
MD5 a88975c08faebe4fd3b2fbda10da4414
BLAKE2b-256 57522b13fbf300ae812f65312af84e9b0288cedb0e73696ebf4ff6b4f4405489

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4.post1-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.post1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1395557bd193117791634a89b826d88ae667e7f6eff563ffa9d1b6f294122eb2
MD5 340611e07111373106dac9ef20f82d79
BLAKE2b-256 90ed55eee8162dc0782e568ecda299dcc686b205095580376aabb5bb5ea588da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 240588c89fb11fc86bfdeee35310b70474f15b00016da91ac26fedeb2a74f46f
MD5 974af62a2e837533657de688fccd721d
BLAKE2b-256 efa28ada64d7b19dbe1c8e379d86a3129351f830d1fed052c80f0b6152228533

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 03160c6ba81e15df73d3328d7db5ee60d33808ef14b11a654089a09f36d6d5ca
MD5 b1b51de753de20f9567a87481bd60f52
BLAKE2b-256 35a4af67d25f67aedf3c6e0308eb23ce4b1651846caffd8efea7bdb0b439b4b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a5e729b69c26c72b4a157e8158dee3d5ea82556af71d6b81e6046f6aed695321
MD5 af10dc0d24f32db4e981d94f1a135559
BLAKE2b-256 8bb709d78c8cc8f65c3dcc5cd886661c77a6840b9746231a37ca4d23dc11d896

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c90ce5c12d8398ab831b6024b7088f5a4e2780df67914203056f6d02d7efc95c
MD5 370c07a5c45bb09c02b76925e6c13e18
BLAKE2b-256 95fac6c491385dbd20661c3faceac46c918daee6eea8fa3bed3a3a8cfe4ea28c

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.4.post1-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.post1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 67d306166cf240bdfc377fc5801827c5325261947570c36a8739adae554ce62f
MD5 7c527fcd757c2ef0ff88bfd2a749da9c
BLAKE2b-256 5cc1cdddbe64f204c2d050045253e3b5c55f61f742c60302fdc0e66e2759be78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b6477de0a4d7b1667ad40a39a8aec3cb34fb18cb8cda8db6360fd982fa9be84
MD5 59b9fa4f623e06ca975651ad969e3fe8
BLAKE2b-256 9ef6bc1977898a2fd36c56461d677a27053434802b4cc4beae622af20bb7bdb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.4.post1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e0e6209ce634b0e9a7700331d738a21c32306007b2ac60cd47ddd0be14cbae26
MD5 8856f8b273fb656f2257c5f11b6b4822
BLAKE2b-256 4bc43fd543cae470b1db902b5ba6f8fe784d8d52e85e718b0a5f0fc53437c652

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