mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
move FormatMoney to Text Utils
This commit is contained in:
committed by
majcosta
parent
fee56e37e7
commit
0dd32c4670
@@ -1261,18 +1261,6 @@ BOOLEAN DrawNumeralsToScreen(INT32 iNumber, INT8 bWidth, UINT16 usLocX, UINT16 u
|
|||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto FormatMoney(INT32 iNumber) -> std::wstring
|
|
||||||
{
|
|
||||||
static std::wstringstream wss([] {
|
|
||||||
std::wstringstream ss;
|
|
||||||
ss.imbue(std::locale(""));
|
|
||||||
return ss;
|
|
||||||
}());
|
|
||||||
wss.str(L"");
|
|
||||||
wss << iNumber;
|
|
||||||
|
|
||||||
return L"$" + wss.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SelectFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
void SelectFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
|
|||||||
@@ -5,6 +5,19 @@
|
|||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
auto FormatMoney(INT32 iNumber) -> std::wstring
|
||||||
|
{
|
||||||
|
static std::wstringstream wss([] {
|
||||||
|
std::wstringstream ss;
|
||||||
|
ss.imbue(std::locale(""));
|
||||||
|
return ss;
|
||||||
|
}());
|
||||||
|
wss.str(L"");
|
||||||
|
wss << iNumber;
|
||||||
|
|
||||||
|
return L"$" + wss.str();
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString )
|
BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString )
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#define STRING_LENGTH 255
|
#define STRING_LENGTH 255
|
||||||
|
|
||||||
|
auto FormatMoney(INT32) -> std::wstring;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
//TCTL_MSG__RANGE_TO_TARGET,
|
//TCTL_MSG__RANGE_TO_TARGET,
|
||||||
|
|||||||
Reference in New Issue
Block a user