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

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.6.1-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.1-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.1-cp314-cp314t-macosx_11_0_arm64.whl (639.7 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nevu_ui-0.6.1-cp314-cp314t-macosx_10_13_x86_64.whl (637.2 kB view details)

Uploaded CPython 3.14tmacOS 10.13+ x86-64

nevu_ui-0.6.1-cp314-cp314-win_amd64.whl (610.6 kB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.6.1-cp314-cp314-musllinux_1_2_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

nevu_ui-0.6.1-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.1-cp314-cp314-macosx_11_0_arm64.whl (625.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nevu_ui-0.6.1-cp314-cp314-macosx_10_13_x86_64.whl (626.8 kB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

nevu_ui-0.6.1-cp313-cp313-win_amd64.whl (608.4 kB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.6.1-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.1-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.1-cp313-cp313-macosx_11_0_arm64.whl (624.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nevu_ui-0.6.1-cp313-cp313-macosx_10_13_x86_64.whl (626.7 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

nevu_ui-0.6.1-cp312-cp312-win_amd64.whl (610.4 kB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.6.1-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.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (627.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nevu_ui-0.6.1-cp312-cp312-macosx_10_13_x86_64.whl (630.3 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: nevu_ui-0.6.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 636.4 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.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 931a7e801fd44403f75e5eb5254968e40d011391d5106afc21ff33e6ce6d938e
MD5 f7579f906c699ce7a004f64b648aa99e
BLAKE2b-256 9787b46e87fef7e7aa056337e1a0355cc2b6d8b4719ee99379b627945edad8f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 41ce1f2d1e1dd2aaab490d9bbd435e8fb89e6bb2afd761b577e352b522120de3
MD5 b8445a8b2ff015cbf1acf3f4bfcd6165
BLAKE2b-256 29f8842969a7100aafbca2f28524c29153f5921d5c5b7fc419722993dedc8029

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.1-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.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e60f369c18dd1343a48d102adb1d211c137b8dd094f8bed1badb76de8d1e4b3e
MD5 164870049b5da78e71928b87c0ddf272
BLAKE2b-256 2fb86dc35fdce2297ad8ec41ebf4c4d1478a0a9d93145a31cb477044fe5b0bf9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e89d52654a6cc591b1d13b41cca3a2ffd1cf1e924b75e0b4044e9e7770425764
MD5 624ffd375704fd477d8c15e5d11fe3aa
BLAKE2b-256 efa577574899207ef9e3b0bac204abeea1298bc372fbedc9bb3a729728886d4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp314-cp314t-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1b4d8488eedeb0bdcef309206d778466f65e1f08886b1b4674cb25d3d9955362
MD5 3579bf438dc54b21a1baddeb3353cdf5
BLAKE2b-256 52c7c23fad42d9c1de8765e6275171ba82560cc8b2d8733b527cc32f87b875dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 610.6 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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 87120c2ee29d35e34c4196ffbe23feba0eb1a68baf810796c55216bbdb952bf7
MD5 ae9e99601e2743088dd198778408d88b
BLAKE2b-256 8b2e8863326329e6c501cf6d5901b5415a743089e9f5b8ba4583a6dad420357e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1a898ef3a0b73ac44f272d0496fb762620120974bcc2683bb3c3a29107952c0d
MD5 dec4d1b431c2f095cb79d0771e2ee07f
BLAKE2b-256 65808c92c501967e688109e22225c49d96ac7a936106314402b3b1913baf20c7

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.1-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.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c5179625f58cddf9d98262195814cf313d2a7b359e6265639be7e322ecadd9fe
MD5 8ab5b2e86e35d743897048c709296079
BLAKE2b-256 f488c487195267bdfd4c81115990525f0745aa9a752f3b59e162bffa5ef599c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 245781ead805e44c7ad19aa1c5dd3989f8f2c3cfa934244fdbe77a5f7d7cc1f9
MD5 e9f88b015c64ac7a3e467f746d6ed019
BLAKE2b-256 f2dc30fcda72b3cd14d06eefc65b8046e65d74fc7c675e99960e1f5f8b99ce24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7c49b1b13f7b7766ff0e5803a1ef621c9f571c9bb5ae6883b52bd432735c57b7
MD5 646ce34449b595a4dcc7f854ab40f4d0
BLAKE2b-256 a1c97c8e37ffc4adce435c6672be0e3c0efc280edc97b55493903cd25dcb0bdc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 608.4 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ce9e168b193cefa79ff4bdeb388895242cf561fcd906c4ce357201232d9c041d
MD5 121cba2b0ca7adfb25a9e1a9fdd42e0a
BLAKE2b-256 8b33d3a772f21f337f640e1a1b76191ed3021c4e3a3b3af123304cd95650627a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 50328dd63fc9a6f63482f2eb402bcfca92d1d06232db66128bc1bdc2d518c230
MD5 05c0bdc46ef42996ea348d961c4adfcb
BLAKE2b-256 2ebb2471946cd83e4e86b7efb93a295b458d2f61cbb3c1ba5565ad3652ab16e6

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.1-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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4858e04a0d7ce68022e6bbe6f59b4023f9349e9e775544002cb00aea6d1cba39
MD5 72cc1bb7625ce98152082a81c16ac97b
BLAKE2b-256 25db53e9420794861f472545ce1db317eeb1c4e625fd2800193fee88179ec40f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 544c168c8e27d4791b96105bc25d1a1b8f61d5f5c1a69204c9a0675c74bf31ca
MD5 4ee0da4574f7ebe3388b97656fcc4bef
BLAKE2b-256 6257f26b83b36a25e6e9191fa9dbae305455ae3865075b574b57a2c79623984f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9e4b32a4a19ed9f40a835ba4c31d700a8f331d50a49aa891c3260b89606375f0
MD5 9dfc9e3ecd172ab8b73837c3588263a6
BLAKE2b-256 81c757ce8228b6a3a066a2f79d87465e1a5d3a8930273956b7d4c4a4f3fe9f65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevu_ui-0.6.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 610.4 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 86e47504adbd6788a4d8381fa389fe24b54de00bbfb2eca0a5f13ae85ccc0d9b
MD5 17846cc912160bf57e8e3f18de269936
BLAKE2b-256 9388806bcc49ec0fdc16a2682891eb0d046e28f4e47d3ba9e89fc0ee23287649

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b72c071db77584c10d2c2c031da154a7e0caca9f79661fca5e68c8331ea71347
MD5 3ea83141665da0ba442a092d7161b270
BLAKE2b-256 7b4cfa3bdd460f3431576276fd5bbbf24441a00058fd763e479f04e723df8d16

See more details on using hashes here.

File details

Details for the file nevu_ui-0.6.1-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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de1ac813574dfb2ef0df002feb2cc52470685ada324177d957babec847065dab
MD5 35f3845f1991974bafc9ac2c478de909
BLAKE2b-256 4c35cc3bd1c03b35f8471c6a47e8c6fe7d674aa8f2acc368de9e7a5cb7a2441b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 193253d8a8dd121c402c419275ab6bfbfd2603d9145b5c936d1c622f1ed66abb
MD5 f74a06fbe9d75ddd3bd781a48144fe04
BLAKE2b-256 32ca79443e0af23944c917aa7867b1253145c9fc4f2cfdc5cb24b92a6baa8943

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.6.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 aa8902f673369b57bab9586ba55f6b9d264555a2913f06d46ef22016a31fcce8
MD5 d56480ef80f80d00901261b7305a86c9
BLAKE2b-256 db18857d02d2746fe6f8efac0a3f8c0ebe79d78b78abc375692b5cbd0b1292c7

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