

HoR ToastLib
Adds server→client packets and HoR-Essentials theme integration.
Description
<div style="background: #4a494863; width: 100%; max-width: 1000px; margin: 20px auto 10px auto; padding: 16px; box-sizing: border-box; border-radius: 10px; overflow: hidden;"> <div style="background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #201d1d; padding: 14px 16px; margin: 0 0 6px 0; border-radius: 5px;"> <p style="margin: 0; color: #334155;">This is a compatibility update for <strong>ToastLib</strong> by AriesLR for Vintage Story 1.22. It keeps the original toast notification library working and adds HoR-specific integrations used by HoR-Essentials.</p> <p style="margin: 10px 0 0 0; color: #1f2937;"><strong>Stats:</strong> 1.22 Compatibility Update • Server to Client ProtoBuf Packets • HoR-Essentials Theme Integration • Universal</p> </div> <details style="background-color: #faf8f5; border-radius: 5px; margin-bottom: 6px; overflow: hidden;" open="open"> <summary style="background: linear-gradient(180deg, #b168d3 0%, #d6b299 100%); color: #201d1d; padding: 12px 15px; font-weight: bold; cursor: pointer;">✨ HoR-Specific Changes</summary> <div style="padding: 12px 15px; background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #243447;"> <ul style="margin: 10px 0;"> <li><strong>Server-to-Client Packet Delivery</strong> (ToastMessagePacket)<br />Added a ProtoBuf <code>ToastMessagePacket</code> with message, display time, background color, and a toast key. Server mods (primarily HoR-Essentials) call <code>ServerAPI.SendToast(player, ...)</code> to push notifications to specific players over a registered <code>toastlib</code> network channel. Server-side only callers never need to bundle ImGui.</li> <li><strong>HoR-Essentials Theme Integration</strong><br />On client startup, reads <code>ModConfig/HoR-Essentials/hor_ui_overrides.json</code> 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. <code>_forceThemeToastColors = true</code> ensures HoR UI theme colors are respected by default.</li> <li><strong>Configurable Toast Position</strong> (SetPosition API)<br />The <code>SetPosition(anchor, offsetX, offsetY)</code> 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.</li> <li><strong>VS 1.22 API Updates</strong><br />Rebuilt targeting .NET 10.0. Updated all ImGuiNET and VSImGui API calls for VS 1.22 compatibility.</li> </ul> </div> </details><details style="background-color: #faf8f5; border-radius: 5px; margin-bottom: 6px; overflow: hidden;"> <summary style="background: linear-gradient(180deg, #b168d3 0%, #d6b299 100%); color: #201d1d; padding: 12px 15px; font-weight: bold; cursor: pointer;">🔗 Original Mod</summary> <div style="padding: 12px 15px; background: linear-gradient(180deg, #d4a8e8 0%, #dfd0c5 100%); color: #243447;"> <p style="margin: 0;"><strong>ToastLib</strong> by <a class="mention username mceNonEditable" href="https://mods.vintagestory.at/show/user/19B647EFB092748FCF9C" data-user-hash="19B647EFB092748FCF9C">AriesLR</a><br />Original mod page: <a style="color: #1f2937;" href="https://mods.vintagestory.at/toastlib">mods.vintagestory.at/toastlib</a></p> </div> </details></div>
Ratings & reviews
Sign in to leave a rating or comment.
