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

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.5.post1-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.post1-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.post1-cp314-cp314-win_amd64.whl (788.7 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.5.post1-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.post1-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.post1-cp313-cp313-win_amd64.whl (777.1 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.5.post1-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.post1-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.post1-cp312-cp312-win_amd64.whl (779.2 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.5.post1-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.post1-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.post1-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 72afc1c2de4d6ec73c688b344c055b586330c022bc63a3d3e8ea09b927a09c0a
MD5 0484654f559a7e515fa55e69146ae998
BLAKE2b-256 90c74ca2b9eaa5e9ca8dfb054dfa05e852e14ed13d5620f450fe3bc2298e2da2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ae7e7f2822d63f64f286065a194c4ffb066e3cfc07dcc15a0057aac7661ca3ba
MD5 4b89701be8d28f97f586d9be1490136c
BLAKE2b-256 95896248d14df7a93562f54be80457cdbdfc0a966b8f6373f4331f578d162bd8

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.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.5.post1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 baa4a2c16b795ae3f749aedeb2aded3f07713fdbc790fe12986bfcb02be1f92a
MD5 e9cc0fc0af15e80948a3d34bef1db3e1
BLAKE2b-256 e23da370c5e83ce6846a2ec66919f479b0ceb319b419298bdf0ce47dd57b47c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7cc6d3a46554b3977846b7e52fe1ec1d056b45ff32a2e027d215609f8108df67
MD5 efaf408ee4f38b158aff912f350ae696
BLAKE2b-256 5c2ef68cea19498dc488bbce3e3d4aac9827bd0c6af8d6c09f9fd51b47d534b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 deab7901bb491b54c4d907a7a6740558f3f2329603baee87b9e58aaf5f3bce23
MD5 04c8429d9a4aabd7aca8f6d3503db3d7
BLAKE2b-256 46772e22a35e9ae72f304dd5f64b5bf94006992bb1df0feaa44b26df3766aaa3

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.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.5.post1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 15cbbdae7b6ebfdae5cd14fb48bb879caa396a114c50dd2e2d23327b086e5384
MD5 8c7f6ff1886836de1feb748bf493545c
BLAKE2b-256 92fbc3a543b183af757c5441cee9b63badc33beb828c5a89ea37b59ee6ef24db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bab8d7c7f337dad8922589fffd9ddec70ede0137bb2a1a7e9f1b15f83b0c20aa
MD5 e29b01691be4542db2f9f0c9a288365c
BLAKE2b-256 2dffab0c87daaf1dc16a609bfb8ae2a9fc8a18be9b843bd025fc21fdc523ae11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dcfff8362d7e94855115461e925605e1bd00db30f6b20b2bcfdf74399b15f9b2
MD5 4a176d0c25a04aee67a57d74358428c5
BLAKE2b-256 05a7fed2582bf9958994c6b0dee49ee1b0e311340ee2afaf24b5806b7e5f92a8

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.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.5.post1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4fd9091ef74e2cb82029d95b5f6b40d93e9bb2600bb49b1342500df8830fc40a
MD5 42f449e67b910f91af2306d95a75512c
BLAKE2b-256 a6b1d15e772b46a0dc1ab19baf83f58df8957d3cdd8448ec31fae787af31d480

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ed668f793ab6249d760e84f81edaf06906a8b3f6f44c1c50be56cbf00ac25937
MD5 07a796f0a03583f3d1796effc8216b6e
BLAKE2b-256 4b7961f75286b7a6f5c73cfdf4b6401809b7cf4d84a42abb2d027afeccef4df2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.5.post1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f0fd53c3ee4e5b33b0e8861a13d7cbe767b02f83d199bd25c09da44378b7c3d7
MD5 6abb861561d7fd78cddabaee69f437ed
BLAKE2b-256 2a81a3e421d8b9cca451d1345f8c04f236d095ff8cb09fcb9c7da4e2f145f779

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.5.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.5.post1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 29390b010b9336de8b371f7a142af41dae71b33cf5690128d60fd43b9e2da991
MD5 8d7675388cdeb3d125cbf666e87ce0e3
BLAKE2b-256 d64a0f915442207d1b27ea6f22877f31656d0cae7148a2c229de67527444feeb

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