show daily discounted costs for 1week and 2week contracts

also shorten translations to fit the UI
This commit is contained in:
Marco Antonio J. Costa
2025-09-26 02:31:02 -03:00
committed by majcosta
parent ffe987061e
commit e8aedb29d5
8 changed files with 44 additions and 27 deletions
+23 -6
View File
@@ -1137,9 +1137,9 @@ BOOLEAN RenderAIMMembers()
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X_NSGI, AIM_CONTRACT_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X_NSGI, AIM_CONTRACT_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
//Draw pay period (day, week, 2 week) //Draw pay period (day, week, 2 week)
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_DAY], ONEDAY_X_NSGI, EXPLEVEL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_DAY], ONEDAY_X_NSGI, EXPLEVEL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X_NSGI, MARKSMAN_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X_NSGI, MARKSMAN_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X_NSGI, MECHANAICAL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X_NSGI, MECHANAICAL_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
//Display Option Gear Cost text //Display Option Gear Cost text
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_MEMBER_OPTIONAL_GEAR_X_NSGI, EXPLOSIVE_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR_NSGI], AIM_MEMBER_OPTIONAL_GEAR_X_NSGI, EXPLOSIVE_Y_NSGI, AIM_CONTRACT_WIDTH_NSGI, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
@@ -1184,9 +1184,9 @@ BOOLEAN RenderAIMMembers()
DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X, AIM_CONTRACT_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_CONTRACT], AIM_CONTRACT_X, AIM_CONTRACT_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED );
//Draw pay period (day, week, 2 week) //Draw pay period (day, week, 2 week)
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_DAY], ONEDAY_X, EXPLEVEL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_DAY], ONEDAY_X, EXPLEVEL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X, MARKSMAN_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_1_WEEK], ONEWEEK_X, MARKSMAN_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X, MECHANAICAL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_2_WEEKS], TWOWEEK_X, MECHANAICAL_Y, AIM_CONTRACT_WIDTH, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
//Display Option Gear Cost text //Display Option Gear Cost text
DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_MEMBER_OPTIONAL_GEAR_X, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen(CharacterInfo[AIM_MEMBER_OPTIONAL_GEAR], AIM_MEMBER_OPTIONAL_GEAR_X, AIM_MEMBER_OPTIONAL_GEAR_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
@@ -1312,6 +1312,19 @@ void SelectFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
#include "LocalizedStrings.h" #include "LocalizedStrings.h"
static auto DrawDiscountedDailyCosts() -> void
{
constexpr auto offset{ 65 };
constexpr auto l{ L"(" };
constexpr auto r{ L")" };
const static auto nsgi = gGameExternalOptions.gfUseNewStartingGearInterface;
const auto width = nsgi ? FEE_WIDTH_NSGI : FEE_WIDTH;
const auto xOffset = nsgi ? FEE_X_NSGI : FEE_X;
DrawTextToScreen((l + FormatMoney(gMercProfiles[gbCurrentSoldier].uiWeeklySalary / 7) + r).data(), xOffset + offset, nsgi ? AGILITY_Y_NSGI : AGILITY_Y, width, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
DrawTextToScreen((l + FormatMoney(gMercProfiles[gbCurrentSoldier].uiBiWeeklySalary / 14) + r).data(), xOffset + offset, nsgi ? DEXTERITY_Y_NSGI : DEXTERITY_Y, width, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
}
BOOLEAN UpdateMercInfo(void) BOOLEAN UpdateMercInfo(void)
{ {
//UINT16 PosY = 300; //UINT16 PosY = 300;
@@ -1329,6 +1342,8 @@ BOOLEAN UpdateMercInfo(void)
DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiWeeklySalary).data(), FEE_X_NSGI, AGILITY_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED); DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiWeeklySalary).data(), FEE_X_NSGI, AGILITY_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiBiWeeklySalary).data(), FEE_X_NSGI, DEXTERITY_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED); DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiBiWeeklySalary).data(), FEE_X_NSGI, DEXTERITY_Y_NSGI, FEE_WIDTH_NSGI, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
DrawDiscountedDailyCosts();
//if medical deposit is required //if medical deposit is required
if( gMercProfiles[gbCurrentSoldier].bMedicalDeposit ) if( gMercProfiles[gbCurrentSoldier].bMedicalDeposit )
{ {
@@ -1389,6 +1404,8 @@ BOOLEAN UpdateMercInfo(void)
DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiWeeklySalary).data(), FEE_WIDTH, FEE_X, AGILITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED); DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiWeeklySalary).data(), FEE_WIDTH, FEE_X, AGILITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiBiWeeklySalary).data(), FEE_WIDTH, FEE_X, DEXTERITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED); DrawTextToScreen(FormatMoney(gMercProfiles[gbCurrentSoldier].uiBiWeeklySalary).data(), FEE_WIDTH, FEE_X, DEXTERITY_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
DrawDiscountedDailyCosts();
//if medical deposit is required //if medical deposit is required
if( gMercProfiles[gbCurrentSoldier].bMedicalDeposit ) if( gMercProfiles[gbCurrentSoldier].bMedicalDeposit )
{ {
+3 -3
View File
@@ -5978,9 +5978,9 @@ STR16 CharacterInfo[] =
L"Tarief", L"Tarief",
L"Contract", L"Contract",
L"een dag", L"1d",
L"een week", L"1w",
L"twee weken", L"2w",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc
+3 -3
View File
@@ -5975,9 +5975,9 @@ STR16 CharacterInfo[] =
L"Fee", L"Fee",
L"Contract", L"Contract",
L"one day", L"1d",
L"one week", L"1w",
L"two weeks", L"2w",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc
+3 -3
View File
@@ -5982,9 +5982,9 @@ STR16 CharacterInfo[] =
L"Tarif", L"Tarif",
L"Contrat", L"Contrat",
L"1 jour", L"1j",
L"1 semaine", L"1s",
L"2 semaines", L"2s",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc
+3 -3
View File
@@ -5887,9 +5887,9 @@ STR16 CharacterInfo[] =
L"Preis", L"Preis",
L"Vertrag", L"Vertrag",
L"1 Tag", L"1T",
L"1 Woche", L"1W",
L"2 Wochen", L"2W",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc
+3 -3
View File
@@ -5964,9 +5964,9 @@ STR16 CharacterInfo[] =
L"Paga", L"Paga",
L"Durata", L"Durata",
L"1 giorno", L"1g",
L"1 settimana", L"1s",
L"2 settimane", L"2s",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc
+3 -3
View File
@@ -5978,9 +5978,9 @@ STR16 CharacterInfo[] =
L"Zapłata", L"Zapłata",
L"Czas", L"Czas",
L"1 dzień", L"1d",
L"1 tydzień", L"1t",
L"2 tygodnie", L"2t",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc
+3 -3
View File
@@ -5971,9 +5971,9 @@ STR16 CharacterInfo[] =
L"Гонорар", L"Гонорар",
L"Срок", L"Срок",
L"1 день", L"1д",
L"7 дней", L"7д",
L"14 дней", L"14д",
// text for the buttons that either go to the previous merc, // text for the buttons that either go to the previous merc,
// start talking to the merc, or go to the next merc // start talking to the merc, or go to the next merc