Wiki 9Minecraft Wiki 9Minecraft
Code Defined Gui Wiki › Guides › Create a Basic Custom Menu Screen

Create a Basic Custom Menu Screen

Setting Up Your First Screen

To build a custom menu in Code Defined Gui Mod, you'll define your screen layout directly in code rather than creating image files. Start by creating a new screen class that extends the mod's base screen type.

Building the Layout

1. Define your screen dimensions and background using built-in sprite components

2. Add UI elements (buttons, text fields, slots) by positioning them with coordinates

3. Use the mod's color tinting system to customize the appearance of standard textures

4. Register event handlers for button clicks and user interactions

5. Test your screen in-game by opening it through a command or item

The mod provides pre-built texture parts you can layer together, eliminating the need to draw backgrounds in an image editor. You can adjust element positions and sizes on the fly—changes take effect immediately without restarting. Use the example screens included with the mod (like the Attribute Filter) as templates for your own designs. Start simple with a single button and text label, then gradually add complexity as you become familiar with the positioning system.