From 27afb0ba38dcf0e74a4d09ba43e73261542b8e96 Mon Sep 17 00:00:00 2001 From: Emma Miler Date: Mon, 19 Dec 2022 19:32:16 +0100 Subject: Restructuring (#365) * Remove launcher proxy * Restructuring * More restructuring * Fix include dirs * Fix merge * Remove clang thing * Filters * Oops --- NorthstarDLL/scriptmainmenupromos.cpp | 124 ---------------------------------- 1 file changed, 124 deletions(-) delete mode 100644 NorthstarDLL/scriptmainmenupromos.cpp (limited to 'NorthstarDLL/scriptmainmenupromos.cpp') diff --git a/NorthstarDLL/scriptmainmenupromos.cpp b/NorthstarDLL/scriptmainmenupromos.cpp deleted file mode 100644 index 5f7a09c1..00000000 --- a/NorthstarDLL/scriptmainmenupromos.cpp +++ /dev/null @@ -1,124 +0,0 @@ -#include "pch.h" -#include "squirrel.h" -#include "masterserver.h" - -// mirror this in script -enum eMainMenuPromoDataProperty -{ - newInfoTitle1, - newInfoTitle2, - newInfoTitle3, - - largeButtonTitle, - largeButtonText, - largeButtonUrl, - largeButtonImageIndex, - - smallButton1Title, - smallButton1Url, - smallButton1ImageIndex, - - smallButton2Title, - smallButton2Url, - smallButton2ImageIndex -}; -ADD_SQFUNC("void", NSRequestCustomMainMenuPromos, "", "", ScriptContext::UI) -{ - g_pMasterServerManager->RequestMainMenuPromos(); - return SQRESULT_NULL; -} - -ADD_SQFUNC("bool", NSHasCustomMainMenuPromoData, "", "", ScriptContext::UI) -{ - g_pSquirrel->pushbool(sqvm, g_pMasterServerManager->m_bHasMainMenuPromoData); - return SQRESULT_NOTNULL; -} - -ADD_SQFUNC("var", NSGetCustomMainMenuPromoData, "int promoDataKey", "", ScriptContext::UI) -{ - if (!g_pMasterServerManager->m_bHasMainMenuPromoData) - return SQRESULT_NULL; - - switch (g_pSquirrel->getinteger(sqvm, 1)) - { - case eMainMenuPromoDataProperty::newInfoTitle1: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.newInfoTitle1.c_str()); - break; - } - - case eMainMenuPromoDataProperty::newInfoTitle2: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.newInfoTitle2.c_str()); - break; - } - - case eMainMenuPromoDataProperty::newInfoTitle3: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.newInfoTitle3.c_str()); - break; - } - - case eMainMenuPromoDataProperty::largeButtonTitle: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.largeButtonTitle.c_str()); - break; - } - - case eMainMenuPromoDataProperty::largeButtonText: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.largeButtonText.c_str()); - break; - } - - case eMainMenuPromoDataProperty::largeButtonUrl: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.largeButtonUrl.c_str()); - break; - } - - case eMainMenuPromoDataProperty::largeButtonImageIndex: - { - g_pSquirrel->pushinteger(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.largeButtonImageIndex); - break; - } - - case eMainMenuPromoDataProperty::smallButton1Title: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.smallButton1Title.c_str()); - break; - } - - case eMainMenuPromoDataProperty::smallButton1Url: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.smallButton1Url.c_str()); - break; - } - - case eMainMenuPromoDataProperty::smallButton1ImageIndex: - { - g_pSquirrel->pushinteger(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.smallButton1ImageIndex); - break; - } - - case eMainMenuPromoDataProperty::smallButton2Title: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.smallButton2Title.c_str()); - break; - } - - case eMainMenuPromoDataProperty::smallButton2Url: - { - g_pSquirrel->pushstring(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.smallButton2Url.c_str()); - break; - } - - case eMainMenuPromoDataProperty::smallButton2ImageIndex: - { - g_pSquirrel->pushinteger(sqvm, g_pMasterServerManager->m_sMainMenuPromoData.smallButton2ImageIndex); - break; - } - } - - return SQRESULT_NOTNULL; -} \ No newline at end of file -- cgit v1.2.3