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.5.post2-cp314-cp314t-win_amd64.whl (822.3 kB view details)

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.5.post2-cp314-cp314t-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nevu_ui-0.6.5.post2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

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

nevu_ui-0.6.5.post2-cp314-cp314-win_amd64.whl (788.6 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.5.post2-cp314-cp314-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

nevu_ui-0.6.5.post2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

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

nevu_ui-0.6.5.post2-cp313-cp313-win_amd64.whl (777.1 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.5.post2-cp313-cp313-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

nevu_ui-0.6.5.post2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

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

nevu_ui-0.6.5.post2-cp312-cp312-win_amd64.whl (779.2 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.5.post2-cp312-cp312-musllinux_1_2_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

nevu_ui-0.6.5.post2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.1 MB view details)

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

File details

Details for the file nevu_ui-0.6.5.post2-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 c416a7f67dbb4fd6fd346b83d6e12e735e767dca63289311d4ebbb55c036357d
MD5 b4cb2e3f30d27854102a964f92cc57a6
BLAKE2b-256 5bd230cb4718cc2fbf03a594f1ad0c227e54064cdb305ed160495799f4d7b6cb

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c22c6c279164b89590e1bfb59e5bfa57b90dcb0130a0f40f729acf91a8830e86
MD5 9f229e09476b6f74bf78b686b7f247f2
BLAKE2b-256 9f7ba0a95e50666c3bfbcddc990e6da414cf4263c09292f81634317ebeca2fb8

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-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.5.post2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a82c792081ffd63eff05dcd44fd644ab7b16b83aa2c0040dde3a7d814540630
MD5 b37d724036f44989e3bdbdfb61fcfb90
BLAKE2b-256 7771bbf3fd3d3838f4ebfdc83c32492cede8f712e977f967a0915552a7e561f4

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ea38d2707c8667bcc7660c46b6de1b9d7505e91799770d6634c3aaf7b59905c3
MD5 67c03d70e29a1f143c929c7bc6c501fb
BLAKE2b-256 a6be999570718f449285925fb4f4a7f5cb94e72882778bd0f18361e09ddf94db

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d7986cd103c2ab660920cff4ed85ebc713a270272044b3b6d6e97dd0285d6e71
MD5 2f15a8ca109397fe2f5b0d1596d8574c
BLAKE2b-256 4ab786848293c780ede4ea67a59dfe793a0bf6e9fa68186defd628448e5c746e

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-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.5.post2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d86e6f47a11b34b95a4f965bf3c73a39fd922b285a2fed492853aab03e64a760
MD5 9180c5251d1cf0cfcc1cf749dc7ebc3e
BLAKE2b-256 22eb7fbbf1dd38d7ab166816db3bb72bbc434fc6d546774061bfa938ae1dd63c

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dde450751b6f224721cd1f51cab682d0c4db95b45b58df3c915262693cbf9d7f
MD5 81cded7d065ecb7f0b5bfc37fa3f251e
BLAKE2b-256 3fa09f90f2a12929dbc55860f8b00e1ceaf287138de10500d8903e0993bdddc1

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 94cf21b5013febf26bc5aa60a543ddae47b71552b6a1c78866fd6cddec46a6c1
MD5 23297ddaf290da6f5534a0e25a90cc29
BLAKE2b-256 f2ee6c3f4e69b371c1a7a984d1d904a036c50a82cd243c07bea0c2a6b9a09f4f

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-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.5.post2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82694d4595e4fed620760a53a89d1046ba758866df47a347821438e28f1ff422
MD5 de0749ee071b2c51f12cf57ad7623960
BLAKE2b-256 37fd11f413cb6208e9f793b01b8035a9abc9990c86e36eb5e1ce0ab996a984a8

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 05b4123384fa52944902d5aa42650c46000b3725033d6d2c6209d369b77f3f39
MD5 6ec0b80d76be46c9192bb39766153fe9
BLAKE2b-256 f41e96962762cb7a4df01b168a86d9be4a9c4bba7ecd74e4c32f6637ce1f71f9

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 406f8a2aaf2d21459d2889a387b899ae84d7388c3f2e05736d7803d4d2a473e5
MD5 74829f6c1092a572aaba67a5549428fc
BLAKE2b-256 53703ccaca3f0a04bbb425226db8f1eba91cec42278387d6e6eda5ed115c486f

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.post2-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.5.post2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a3cbe4e7c1848e59a43148b8f6c7ae053f670b4fde929996231a3b8c0010d796
MD5 71b3b70fdbc9d8c519a8b1aaafbf3549
BLAKE2b-256 b04146f3c45685f77ceaf8659c203f321e644de3200be13e4d2bca4708a1b140

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