From 2d13230cff953304958bc6916fb1728284c5614e Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Thu, 27 Mar 2025 10:01:28 +1100 Subject: [PATCH] Begun adding support for Fourthwall --- horizontal-chat/script.js | 67 ++++++++++++++++++++++++ horizontal-chat/settings/settings.json | 8 +++ horizontal-chat/style.css | 4 ++ multichat-overlay/script.js | 67 ++++++++++++++++++++++++ multichat-overlay/settings/settings.json | 8 +++ multichat-overlay/style.css | 4 ++ 6 files changed, 158 insertions(+) diff --git a/horizontal-chat/script.js b/horizontal-chat/script.js index a48cd28..4c0221d 100644 --- a/horizontal-chat/script.js +++ b/horizontal-chat/script.js @@ -49,6 +49,7 @@ const showStreamElementsTips = GetBooleanParam("showStreamElementsTips", true); const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true); const showKofiDonations = GetBooleanParam("showKofiDonations", true); const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true); +const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true); // Set fonts for the widget document.body.style.fontFamily = font; @@ -217,6 +218,36 @@ client.on('TipeeeStream.Donation', (response) => { TipeeeStreamDonation(response.data); }) +client.on('Fourthwall.GiftPurchase', (response) => { + console.debug(response.data); + FourthwallGiftPurchase(response.data); +}) + +client.on('Fourthwall.OrderPlaced', (response) => { + console.debug(response.data); + FourthwallOrderPlaced(response.data); +}) + +client.on('Fourthwall.Donation', (response) => { + console.debug(response.data); + FourthwallDonation(response.data); +}) + +client.on('Fourthwall.SubscriptionPurchased', (response) => { + console.debug(response.data); + FourthwallSubscriptionPurchased(response.data); +}) + +client.on('Fourthwall.GiftDrawStarted', (response) => { + console.debug(response.data); + FourthwallGiftDrawStarted(response.data); +}) + +client.on('Fourthwall.GiftDrawEnd', (response) => { + console.debug(response.data); + FourthwallGiftDrawEnd(response.data); +}) + ///////////////////// @@ -801,6 +832,42 @@ function TipeeeStreamDonation(data) { ShowAlert(message, 'tipeeeStream'); } +function FourthwallGiftPurchase(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallOrderPlaced(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallDonation(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallSubscriptionPurchased(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallGiftDrawStarted(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallGiftDrawEnd(data) { + if (!showFourthwallAlerts) + return; + +} + ////////////////////// diff --git a/horizontal-chat/settings/settings.json b/horizontal-chat/settings/settings.json index a54c57f..6e2a11a 100644 --- a/horizontal-chat/settings/settings.json +++ b/horizontal-chat/settings/settings.json @@ -231,6 +231,14 @@ "defaultValue": true, "group": "Which donation messages do you want to see?" }, + { + "id": "showFourthwallAlerts", + "label": "Fourthwall Alerts", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which donation messages do you want to see?" + }, { "id": "address", "label": "Address", diff --git a/horizontal-chat/style.css b/horizontal-chat/style.css index 850bf5b..ed7a0e6 100644 --- a/horizontal-chat/style.css +++ b/horizontal-chat/style.css @@ -253,6 +253,10 @@ li { background: linear-gradient(#120e23, #5d192a) !important; } +.fourthwall { + background: linear-gradient(#405eb3, #0d3cb9) !important; +} + /****************/ /** ANIMATIONS **/ /****************/ diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index fd5b74e..e734672 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -48,6 +48,7 @@ const showStreamElementsTips = GetBooleanParam("showStreamElementsTips", true); const showPatreonMemberships = GetBooleanParam("showPatreonMemberships", true); const showKofiDonations = GetBooleanParam("showKofiDonations", true); const showTipeeeStreamDonations = GetBooleanParam("showTipeeeStreamDonations", true); +const showFourthwallAlerts = GetBooleanParam("showFourthwallAlerts", true); // Set fonts for the widget document.body.style.fontFamily = font; @@ -231,6 +232,36 @@ client.on('TipeeeStream.Donation', (response) => { TipeeeStreamDonation(response.data); }) +client.on('Fourthwall.GiftPurchase', (response) => { + console.debug(response.data); + FourthwallGiftPurchase(response.data); +}) + +client.on('Fourthwall.OrderPlaced', (response) => { + console.debug(response.data); + FourthwallOrderPlaced(response.data); +}) + +client.on('Fourthwall.Donation', (response) => { + console.debug(response.data); + FourthwallDonation(response.data); +}) + +client.on('Fourthwall.SubscriptionPurchased', (response) => { + console.debug(response.data); + FourthwallSubscriptionPurchased(response.data); +}) + +client.on('Fourthwall.GiftDrawStarted', (response) => { + console.debug(response.data); + FourthwallGiftDrawStarted(response.data); +}) + +client.on('Fourthwall.GiftDrawEnd', (response) => { + console.debug(response.data); + FourthwallGiftDrawEnd(response.data); +}) + /////////////////////// @@ -1325,6 +1356,42 @@ function TipeeeStreamDonation(data) { AddMessageItem(instance, data.id); } +function FourthwallGiftPurchase(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallOrderPlaced(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallDonation(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallSubscriptionPurchased(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallGiftDrawStarted(data) { + if (!showFourthwallAlerts) + return; + +} + +function FourthwallGiftDrawEnd(data) { + if (!showFourthwallAlerts) + return; + +} + ////////////////////// diff --git a/multichat-overlay/settings/settings.json b/multichat-overlay/settings/settings.json index 663d71b..521c84c 100644 --- a/multichat-overlay/settings/settings.json +++ b/multichat-overlay/settings/settings.json @@ -293,6 +293,14 @@ "defaultValue": true, "group": "Which donation messages do you want to see?" }, + { + "id": "showFourthwallAlerts", + "label": "Fourthwall Alerts", + "description": "", + "type": "checkbox", + "defaultValue": true, + "group": "Which donation messages do you want to see?" + }, { "id": "address", "label": "Address", diff --git a/multichat-overlay/style.css b/multichat-overlay/style.css index 2c7f31e..1efaa66 100644 --- a/multichat-overlay/style.css +++ b/multichat-overlay/style.css @@ -219,6 +219,10 @@ li { background: linear-gradient(#120e23, #5d192a) !important; } +.fourthwall { + background: linear-gradient(#405eb3, #0d3cb9) !important; +} + /****************/ /** ANIMATIONS **/ /****************/