From 627dea4a06fb15a5b4d51e76507ddb4a2cd14c3a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 23 Oct 2016 16:29:49 +0200 Subject: [PATCH] Merge with develop --- code/nel/tools/3d/build_interface/main.cpp | 25 +++++- .../data/gamedev/interfaces_v3/widgets.xml | 80 +++++++++---------- .../client/ryzom_installer/src/configfile.cpp | 3 + .../ryzom_installer/src/filesextractor.cpp | 2 +- 4 files changed, 68 insertions(+), 42 deletions(-) diff --git a/code/nel/tools/3d/build_interface/main.cpp b/code/nel/tools/3d/build_interface/main.cpp index 859e2caf5..a8f854721 100644 --- a/code/nel/tools/3d/build_interface/main.cpp +++ b/code/nel/tools/3d/build_interface/main.cpp @@ -209,6 +209,7 @@ int main(int argc, char **argv) NLMISC::CCmdArgs args; args.setDescription("Build a huge interface texture from several small elements to optimize video memory usage."); + args.addArg("f", "format", "format", "Output format (png or tga)"); args.addArg("s", "subset", "existing_uv_txt_name", "Build a subset of an existing interface definition while preserving the existing texture ids, to support freeing up VRAM by switching to the subset without rebuilding the entire interface."); args.addArg("x", "extract", "", "Extract all interface elements from to ."); args.addAdditionalArg("output_filename", "PNG or TGA file to generate", true); @@ -229,12 +230,26 @@ int main(int argc, char **argv) // extract all interface elements bool extractElements = args.haveArg("x"); + // output format + std::string outputFormat; + + if (args.haveArg("f")) + { + outputFormat = args.getArg("f").front(); + + if (outputFormat != "png" && outputFormat != "tga") + { + outString(toString("ERROR: Format %s not supported, only png and tga formats are", outputFormat.c_str())); + return -1; + } + } + std::vector inputDirs = args.getAdditionalArg("input_path"); string fmtName = args.getAdditionalArg("output_filename").front(); // append PNG extension if no one provided - if (fmtName.rfind('.') == string::npos) fmtName += ".png"; + if (fmtName.rfind('.') == string::npos) fmtName += "." + (outputFormat.empty() ? "png":outputFormat); if (extractElements) { @@ -323,6 +338,14 @@ int main(int argc, char **argv) sTGAname = inputDirs.front() + "/" + tgaName; + // force specific format instead of using original one + if (!outputFormat.empty()) + { + sTGAname = sTGAname.substr(0, sTGAname.rfind('.')); + sTGAname += "." + outputFormat; + } + + // write the file if (writeFileDependingOnFilename(sTGAname, bitmap)) { outString(toString("Writing file %s", sTGAname.c_str())); diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml index 5f2b5da8c..34b6d775c 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/widgets.xml @@ -147,7 +147,7 @@ id="real_txt" posref="ML ML" x="26" - y="-2" + y="0" fontsize="12" shadow="true" hardtext="uimGcmTradePact" @@ -202,7 +202,7 @@ id="real_txt" posref="ML ML" x="26" - y="-2" + y="0" fontsize="12" shadow="true" hardtext="uimGcmTradePact" @@ -230,7 +230,7 @@ win_priority="%win_priority_world_space" posref="BL BM" use_cursor="false"> - + - + - +