Skip to content

Empty widget

EmptyWidget

A widget that doesn't draw at all.

EmptyWidget is a subclass of: Widget

Use case

from nevu_ui import *
import pygame

pygame.init()

window = Window((500, 500), title = "EmptyWidget example")

menu = Menu(window, (100%vw, 100%vh))

layout = Grid([100%fillw, 100%fillh], x=3, y=3)

widget = EmptyWidget((100, 100))

layout.add_item(widget, 2, 2)

menu.layout = layout

while True:
    window.begin_frame()
    window.update()
    menu.update()
    menu.draw()
    window.end_frame()
from nevu_ui import *
import pyray

window = Window((500, 500), title = "EmptyWidget example", backend = Backend.RayLib)

menu = Menu(window, (100%vw, 100%vh))

layout = Grid([100%fillw, 100%fillh], x=3, y=3)

widget = EmptyWidget((100, 100))

layout.add_item(widget, 2, 2)

menu.layout = layout

while True:
    window.begin_frame()
    window.update()
    menu.update()
    menu.draw()
    window.end_frame()

Created with GGen v1.1.0 for nevu_ui v0.7.5