From 35d2384215d09d7555f0922b63bd6230c8c0605d Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sun, 13 Dec 2015 21:01:13 +0200 Subject: [PATCH] Changed: Display inventory bulk with two decimal places --- code/ryzom/client/src/interface_v3/action_handler_game.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 644722511..76b28f827 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -4048,7 +4048,7 @@ public: // Get the sum of the bulk for this db branch const double epsilon = 0.001; - sint32 val = sint32(CInventoryManager::getBranchBulk(dbBranch, 0, 10000) + epsilon); + float val = CInventoryManager::getBranchBulk(dbBranch, 0, 10000) + epsilon; // Get the Max value sint32 maxVal= 0; @@ -4058,7 +4058,7 @@ public: // Replace in the formated text ucstring str= CI18N::get("uittBulkFormat"); - strFindReplace(str, "%v", toString(val) ); + strFindReplace(str, "%v", toString("%.2f", val) ); strFindReplace(str, "%m", toString(maxVal) ); CWidgetManager::getInstance()->setContextHelpText(str); } @@ -4502,4 +4502,4 @@ public: } } }; -REGISTER_ACTION_HANDLER( CHandlerEmote, "emote"); \ No newline at end of file +REGISTER_ACTION_HANDLER( CHandlerEmote, "emote");