Shown!

Quick rating

Shown!

No reviews yet

An easy-to-use widget-based UI library!

Mod Loaders
NeoForge
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Unsupported

About

Project Details

Type
Mod
License
All Rights Reserved
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

Shown!

Shown! is a widget-based UI library for Minecraft, allowing simple creation of interfaces for all sorts of purposes!

Screens

Just like Minecraft, you need to start with a Screen. The Screen is where your entire interface is created, and handled. The most basic screen can be created as follows:

public class ExampleScreen extends ShownScreen {
    public ExampleScreen() {
        super();
    }

    @Override
    protected void init() {
        super.init();
    }
}

When creating and adding widgets, you should make them in init(). Your call to super.init() should also always be at the bottom, as this runs the initialization for all of the added widgets, as well as updates the dimensions of each widget.

Widgets

Adding widgets is extremely simple, as well as how they function. First, we should go over how to position and scale them.

Widgets use a custom Vector class called UIVec to handle position and scale. UIVec has two values for each axis, scale and offset. Scale is the value of the axis relative to the parent widget, while offset is a constant value. An example of how this works can be shown here: Layout Example

As seen above, the entire width of the panel is 100px while the height of the box is only 80px. The elements contained within the panel are as follows:

  • A red box, parented to the main panel. It has a position of (0, 0, 0, 0) and a size of (0.5, 0.5, 0, 0), therefore being 50x40px large.
  • A green box, parented to the main panel. It has a position of (0.5, 0.25, 0, 0) and a size of (0.25, 0.75, 0, 0), therefore being 25x60px large, while also being positioned at (50, 20)
  • A blue box, parented to the red box. It also has a position of (0, 0, 0, 0) and a size of (0.5, 05, 0, 0), therefore it is 25x20px large.

Positioning and scaling widgets this way allows for exact relativity for all screen sizes, and also specific sized elements, such as a 20px tall header bar.

Using this understanding, placing a simple panel widget in the center of the screen that is half of the size in each axis can be done as follows:

@Override
protected void init() {
    PanelWidget panel = new PanelWidget(
            new UIVec(0.25, 0.25, 0, 0),
            new UIVec(0.5, 0.5, 0, 0)
    );
    this.addWidget(panel);

    super.init();
}

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Modrinth
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works