Wiki 9Minecraft Wiki 9Minecraft

Code Defined Gui Mod FAQ

10 questions players actually ask, answered.

How do I start making my first GUI screen with this mod?
Begin by creating a new screen class and use the mod's code-based layout system to define your menu structure through code instead of image files. The mod provides builder methods and helper functions to position elements, set sizes, and attach them to your screen—check the example screens included with the mod to see the basic pattern.
Can I use this mod to replace static background images with code-drawn layouts?
Yes, that's the core purpose of this mod. Instead of creating menu backgrounds in an image editor, you define the entire layout in code using built-in sprite parts and positioning calls, which eliminates the need for pre-drawn texture files.
What built-in textures and sprites does this mod provide?
The mod includes a library of standard GUI sprite parts (borders, panels, buttons, slots, and decorative elements) that you can combine and color-tint to create different visual styles without needing custom artwork.
How do I change colors and apply tinting to GUI elements?
The mod provides color and tinting parameters on most elements—you can pass RGB or hex color values directly in your code to recolor built-in sprites and adjust their appearance without creating new texture files.
Can my menu change shape or layout while the game is running?
Yes, this is a key feature—since layouts are defined in code rather than static images, you can modify screen dimensions, reposition elements, or swap entire sections during gameplay by updating your layout logic.
How do I add buttons, text fields, and other interactive elements?
The mod provides methods to attach buttons, input fields, sliders, and other widgets to your screen layout; you define their position, size, and behavior in code, then bind them to your mod's logic through callbacks or event handlers.
Is this mod compatible with other GUI mods or mod menus?
Code Defined Gui Mod is designed to work alongside other mods—it only affects screens you explicitly build with it, so it won't conflict with unrelated mod interfaces unless they directly compete for the same screen space.
What happens if I want to use custom textures alongside the built-in sprites?
You can load and reference your own texture files in your code layout and position them alongside built-in sprites, giving you flexibility to mix pre-drawn art with code-generated elements.
Does using code-defined GUIs instead of image files improve performance?
Code-defined layouts can reduce memory overhead from large texture files and allow for more efficient rendering since elements are drawn on-demand rather than loaded as complete pre-rendered images, though the actual performance gain depends on your screen complexity.
What's the best way to learn this mod if I'm new to GUI modding?
Start by examining the example screens (like the Attribute Filter and List Filter) that ship with the mod to understand the code structure, then follow the included guides to build a simple menu, apply colors, and add interactive elements step by step.