Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
/ widgets Public archive

Widget model to create custom user interfaces via plugin messages in LabyMod3

Notifications You must be signed in to change notification settings

LabyMod/widgets

Repository files navigation

Widget model to create custom User Interfaces via plugin messages

Click here for more detailed information.

Available widgets:

  • Button
  • Text Field
  • Label
  • Color Picker
  • Image

Example

example

Serialize widgets

// Create new screen
WidgetScreen screen = new WidgetScreen(42); // The client will send this id back on an interaction

// Centered anchor
Anchor anchor = new Anchor(50, 50); // X: 50%   Y: 50%
        
// Add button to widget list
screen.addWidget(new ButtonWidget(0, anchor, -50, 20, "Apply", 100, 20));

// Serialize widgets
JsonObject object = screen.toJsonObject(EnumScreenAction.OPEN); // OPEN = Open the screen

Anchor explanation image

example

About

Widget model to create custom user interfaces via plugin messages in LabyMod3

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages