Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Entity GUI Library

Entity GUI Library

A library mod for creating custom entity GUIs that automatically replace vanilla ones. Provides a clean API for mod authors to easily add custom interfaces to any entity type.

Features

  • Automatic replacement - Intercepts vanilla GUIs and replaces them with your custom version
  • Vanilla styling - Proper frame, titlebar, close button, entity preview, and status display
  • E Key support - Close GUI with E key like vanilla
  • Auto-refresh - Live-updating GUIs for progress bars, energy levels, etc.
  • Helper functions - Tabbed interfaces, confirmation dialogs
  • Multi-mod support - Priority system for handling conflicts between mods
  • 35+ entity statuses - Comprehensive status display coverage

For Mod Authors

Simple registration via remote interface:

```lua
remote.call("entity_gui_lib", "register", {
mod_name = "my_mod",
entity_type = "inserter",
on_build = "build_my_gui",
})
```

Your callback receives a container to add custom GUI elements:

```
remote.add_interface("my_mod", {
build_my_gui = function(container, entity, player)
container.add{type = "button", caption = "Click me"}
end,
})
```

## Documentation

See the discussion

## Example Mod

Includes a complete example mod in \examples\ demonstrating:
- Basic button interactions
- Confirmation dialogs
- Tabbed interfaces
- Auto-refreshing progress bars
- Custom preview sizes

---

*This is a library mod - it does nothing on its own. Other mods could use it to create custom entity GUIs.*

Disclaimer: Still learning GUI, this might not work, might be missing features, or might not be suitable for you.

Shoutout: thesixthroc's Cerys mod - specifically the Fulgoran Teleporter GUI.

Рейтинг

Войдите, чтобы голосовать.
🏅 Нет оценок

Базовые теги:

Загрузить 15.2 KB