Back to NxLabs

NxLabs / Vintage Story

HoR ToastLib

PBy Panduhs

Adds server→client packets and HoR-Essentials theme integration.

Description

This is a compatibility update for ToastLib by AriesLR for Vintage Story 1.22. It keeps the original toast notification library working and adds HoR-specific integrations used by HoR-Essentials.

Stats: 1.22 Compatibility Update • Server to Client ProtoBuf Packets • HoR-Essentials Theme Integration • Universal

✨ HoR-Specific Changes
  • Server-to-Client Packet Delivery (ToastMessagePacket)
    Added a ProtoBuf ToastMessagePacket with message, display time, background color, and a toast key. Server mods (primarily HoR-Essentials) call ServerAPI.SendToast(player, ...) to push notifications to specific players over a registered toastlib network channel. Server-side only callers never need to bundle ImGui.
  • HoR-Essentials Theme Integration
    On client startup, reads ModConfig/HoR-Essentials/hor_ui_overrides.json to pick up the player's toast anchor position, X/Y offsets, and color theme. Re-reads every 5 seconds so in-game theme changes apply without a reload. _forceThemeToastColors = true ensures HoR UI theme colors are respected by default.
  • Configurable Toast Position (SetPosition API)
    The SetPosition(anchor, offsetX, offsetY) method is publicly exposed so other mods can reposition toasts. Valid anchors: top-left, top-center, top-right, mid-left, mid-center, mid-right, bot-left, bot-center, bot-right.
  • VS 1.22 API Updates
    Rebuilt targeting .NET 10.0. Updated all ImGuiNET and VSImGui API calls for VS 1.22 compatibility.
🔗 Original Mod

ToastLib by AriesLR
Original mod page: mods.vintagestory.at/toastlib

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.