From 42f45aff1ebbaf7bb9578fbdfa75ba3a7c789129 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 25 Jan 2019 11:16:53 +0200 Subject: [PATCH 01/13] Removed: Client interface xml from compatibility-develop --HG-- branch : compatibility-develop --- .../client/data/gamedev/interfaces_v3/map.lua | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 code/ryzom/client/data/gamedev/interfaces_v3/map.lua diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/map.lua b/code/ryzom/client/data/gamedev/interfaces_v3/map.lua deleted file mode 100644 index 609d18b28..000000000 --- a/code/ryzom/client/data/gamedev/interfaces_v3/map.lua +++ /dev/null @@ -1,42 +0,0 @@ --- --- custom maps --- - -if (game==nil) then - game= {}; -end - --- alternative textures for maps -game.mapTextures = {} --- game.mapTextures["zorai_map.tga"] = "tryker_map.tga" - --- register alternative texture for map -function game:setAltMap(mapName, altMap) - self.mapTextures[mapName] = altMap -end - --- remove alternative map texture -function game:removeAltMap(mapName) - self.mapTextures[mapName] = nil -end - --- map = getUI("ui:interface:map:content:map_content:actual_map") -function game:onLoadMap(map) - -- debugInfo("onLoadMap(id=".. map.id ..", texture=".. map.texture ..")"); - - -- if alt view not enabled - if getDbProp("UI:VARIABLES:SHOW_ALT_MAP") == 0 or map:isIsland() then - return - end - - local texture = map.texture - if self.mapTextures[texture] ~= nil then - -- debugInfo("-- using ".. self.mapTextures[texture] .." for " .. texture) - return self.mapTextures[texture] - end -end - --- register map overrride --- game:setAltMap("fyros_map.tga", "fyros_map_sp.tga") - - From 2694cdb7890e11dfe40a627132e9f382f65063a4 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Fri, 25 Jan 2019 23:46:38 +0800 Subject: [PATCH 02/13] Set up CI --- azure-pipelines.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..39541fd7d --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +jobs: + - job: ubuntu16 + pool: + vmImage: 'Ubuntu-16.04' + steps: + - script: | + sudo apt-get update + sudo apt-get upgrade -y + sudo apt-get install liblua5.1-dev libluabind-dev libcpptest-dev -y + sudo apt-get install libogg-dev libvorbis-dev libopenal-dev -y + sudo apt-get install libgif-dev libfreetype6-dev -y + sudo apt-get install libxml2-dev -y + displayName: 'Dependencies' + - script: | + mkdir build + cmake --version + cd build + cmake -DWITH_NEL_TESTS=ON -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=ON -DWITH_NEL_TOOLS=ON ../code + cat build/CMakeCache.txt + displayName: 'CMake' + - script: | + make -j`nproc` + displayName: 'Make' \ No newline at end of file From 4c84748bace4a7dac3910b6b01633408f1bdeb29 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Fri, 25 Jan 2019 23:59:35 +0800 Subject: [PATCH 03/13] Update --- azure-pipelines.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 39541fd7d..1d200d1bc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,7 +5,10 @@ jobs: steps: - script: | sudo apt-get update - sudo apt-get upgrade -y + sudo apt-get install cmake build-essential -y + sudo apt-get install libmysqlclient15-dev -y + sudo apt-get install bison autoconf automake -y + sudo apt-get install libpng12-dev libjpeg62-dev -y sudo apt-get install liblua5.1-dev libluabind-dev libcpptest-dev -y sudo apt-get install libogg-dev libvorbis-dev libopenal-dev -y sudo apt-get install libgif-dev libfreetype6-dev -y From 7661d49bf0722502bf903c91cd4032c36b9b3ebd Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sat, 26 Jan 2019 00:03:07 +0800 Subject: [PATCH 04/13] Update --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d200d1bc..e100d14d4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,7 @@ jobs: sudo apt-get install libogg-dev libvorbis-dev libopenal-dev -y sudo apt-get install libgif-dev libfreetype6-dev -y sudo apt-get install libxml2-dev -y + sudo apt-get install libcurl4-openssl-dev -y displayName: 'Dependencies' - script: | mkdir build From 397f5b15072fa34445fc120a1a9ab82762af713a Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sat, 26 Jan 2019 00:07:21 +0800 Subject: [PATCH 05/13] Update --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e100d14d4..a4695291e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ jobs: - script: | sudo apt-get update sudo apt-get install cmake build-essential -y - sudo apt-get install libmysqlclient15-dev -y + sudo apt-get install libmysqlclient-dev -y sudo apt-get install bison autoconf automake -y sudo apt-get install libpng12-dev libjpeg62-dev -y sudo apt-get install liblua5.1-dev libluabind-dev libcpptest-dev -y @@ -14,6 +14,7 @@ jobs: sudo apt-get install libgif-dev libfreetype6-dev -y sudo apt-get install libxml2-dev -y sudo apt-get install libcurl4-openssl-dev -y + sudo apt-get install libsquish-dev -y displayName: 'Dependencies' - script: | mkdir build From bd274c5ad04081f663d233e56ca8f3041748afdd Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sat, 26 Jan 2019 00:11:23 +0800 Subject: [PATCH 06/13] Update --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a4695291e..89562087c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,13 +14,12 @@ jobs: sudo apt-get install libgif-dev libfreetype6-dev -y sudo apt-get install libxml2-dev -y sudo apt-get install libcurl4-openssl-dev -y - sudo apt-get install libsquish-dev -y displayName: 'Dependencies' - script: | mkdir build cmake --version cd build - cmake -DWITH_NEL_TESTS=ON -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=ON -DWITH_NEL_TOOLS=ON ../code + cmake -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF ../code cat build/CMakeCache.txt displayName: 'CMake' - script: | From 61b1509048589ed1cdc696cd769376165904bbc0 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sat, 26 Jan 2019 00:14:36 +0800 Subject: [PATCH 07/13] Update --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 89562087c..2ede2a7e8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,7 +20,7 @@ jobs: cmake --version cd build cmake -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF ../code - cat build/CMakeCache.txt + cat CMakeCache.txt displayName: 'CMake' - script: | make -j`nproc` From f4ff5e0d2567f3780f5b7c5e173c433bee90f7e0 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sat, 26 Jan 2019 00:17:22 +0800 Subject: [PATCH 08/13] Update --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2ede2a7e8..6ad47eba4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,5 +23,6 @@ jobs: cat CMakeCache.txt displayName: 'CMake' - script: | + cd build make -j`nproc` displayName: 'Make' \ No newline at end of file From 86195393dbbc7e4d76bf12bb6c38991c6240d833 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Sat, 26 Jan 2019 00:41:31 +0800 Subject: [PATCH 09/13] Update: Pipeline script --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6ad47eba4..6e0f2b2a7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,8 +4,14 @@ jobs: vmImage: 'Ubuntu-16.04' steps: - script: | + sudo apt-get update + sudo apt-get install -y software-properties-common + sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install cmake build-essential -y + sudo apt-get install gcc-8 g++-8 -y + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 sudo apt-get install libmysqlclient-dev -y sudo apt-get install bison autoconf automake -y sudo apt-get install libpng12-dev libjpeg62-dev -y From a888ce008050e1feba00b37b6f4a28b33d172cc0 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 28 Jan 2019 11:40:52 +0200 Subject: [PATCH 10/13] Changed: Make border duplication as default for build interface --HG-- branch : develop --- code/nel/tools/3d/build_interface/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/tools/3d/build_interface/main.cpp b/code/nel/tools/3d/build_interface/main.cpp index 58c97e513..ed7f220b5 100644 --- a/code/nel/tools/3d/build_interface/main.cpp +++ b/code/nel/tools/3d/build_interface/main.cpp @@ -214,7 +214,7 @@ int main(int argc, char **argv) args.addArg("x", "extract", "", "Extract all interface elements from to ."); args.addAdditionalArg("output_filename", "PNG or TGA file to generate", true); args.addAdditionalArg("input_path", "Path that containts interfaces elements", false); - args.addArg("b", "border", "", "Duplicate icon border to allow bilinear filtering"); + args.addArg("", "no-border", "", "Disable border duplication. Enabled by default"); if (!args.parse(argc, argv)) return 1; @@ -229,10 +229,10 @@ int main(int argc, char **argv) } // - uint borderSize = 0; - if (args.haveArg("b")) + uint borderSize = 1; + if (args.haveLongArg("no-border")) { - borderSize = 1; + borderSize = 0; } // extract all interface elements From d97f5b1a8bad84b4fb5c238a7b1aa20487e5a620 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 28 Jan 2019 11:40:52 +0200 Subject: [PATCH 11/13] Changed: Enable UI bilinear filtering by default. Requires new atlases to be generated --HG-- branch : develop --- code/ryzom/client/client_default.cfg | 5 +++++ code/ryzom/client/src/client_cfg.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index 950da08b6..11bd62b5b 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -326,6 +326,11 @@ InterfaceScale_min = 0.8; InterfaceScale_max = 2.0; InterfaceScale_step = 0.05; +// Enable biliner filtering for UI textures +// Texture atlas needs to be generated with border duplication +// or there will be visible texture bleeding +BilinearUI = 1; + // Default values for map MaxMapScale = 2.0; R2EDMaxMapScale = 8.0; diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index e1ab87c02..ea81cd980 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -304,7 +304,7 @@ CClientConfig::CClientConfig() InterfaceScale_min = 0.8f; InterfaceScale_max = 2.0f; InterfaceScale_step = 0.05; - BilinearUI = false; + BilinearUI = true; VREnable = false; VRDisplayDevice = "Auto"; From 1f1bd9fb8f5486a9295cc7b7e3529c934d1f88d3 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 29 Jan 2019 00:34:38 +0200 Subject: [PATCH 12/13] Changed: Allow to override scroll bar texture width/height --HG-- branch : develop --- code/nel/include/nel/gui/ctrl_scroll.h | 1 + code/nel/src/gui/ctrl_scroll.cpp | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/code/nel/include/nel/gui/ctrl_scroll.h b/code/nel/include/nel/gui/ctrl_scroll.h index cf01ada78..a22da2cbd 100644 --- a/code/nel/include/nel/gui/ctrl_scroll.h +++ b/code/nel/include/nel/gui/ctrl_scroll.h @@ -175,6 +175,7 @@ namespace NLGUI bool _CallingAH : 1; bool _Cancelable : 1; // true if the slider may be cancelled when pressed on the mouse right button bool _Frozen : 1; + bool _Scale : 1; // For Target Scroller only: the target offset step in pixel. sint32 _TargetStepX; diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp index acdaa15f5..e97bd8cd4 100644 --- a/code/nel/src/gui/ctrl_scroll.cpp +++ b/code/nel/src/gui/ctrl_scroll.cpp @@ -68,6 +68,7 @@ namespace NLGUI _StepValue = 0; _TileM = false; _Frozen = false; + _Scale = false; } // ------------------------------------------------------------------------------------------------ @@ -108,6 +109,11 @@ namespace NLGUI return getTextureTopOrRight(); } else + if( name == "scale" ) + { + return toString( _Scale ); + } + else if( name == "vertical" ) { return toString( _Vertical ); @@ -244,6 +250,14 @@ namespace NLGUI return; } else + if( name =="scale" ) + { + bool b; + if (fromString( value, b ) ) + _Scale = b; + return; + } + else if( name == "vertical" ) { bool b; @@ -408,6 +422,7 @@ namespace NLGUI xmlSetProp( node, BAD_CAST "tx_bottomleft", BAD_CAST getTextureBottomOrLeft().c_str() ); xmlSetProp( node, BAD_CAST "tx_middle", BAD_CAST getTextureMiddle().c_str() ); xmlSetProp( node, BAD_CAST "tx_topright", BAD_CAST getTextureTopOrRight().c_str() ); + xmlSetProp( node, BAD_CAST "scale", BAD_CAST toString( _Scale ).c_str() ); xmlSetProp( node, BAD_CAST "vertical", BAD_CAST toString( _Vertical ).c_str() ); std::string align; @@ -480,6 +495,10 @@ namespace NLGUI if(prop) setTextureTopOrRight(string((const char*)prop)); else setTextureTopOrRight ("w_scroll_l0_t.tga"); + // Override texture size (w for vertical, h for horizontal) + prop = (char*) xmlGetProp( node, (xmlChar*)"scale" ); + if (prop) _Scale = convertBool((const char*)prop); + // Read properties prop = (char*) xmlGetProp( node, (xmlChar*)"vertical" ); if (prop) _Vertical = convertBool((const char*)prop); @@ -606,13 +625,13 @@ namespace NLGUI if (_Vertical) { - _W = w; + if (!_Scale) _W = w; _H = _Target->getMaxHReal(); } else { _W = _Target->getMaxWReal(); - _H = h; + if (!_Scale) _H = h; } CCtrlBase::updateCoords (); From 5a1a167de91056c074e73aff026a0847063b6e38 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Tue, 29 Jan 2019 00:37:34 +0200 Subject: [PATCH 13/13] Added: Scroll bar for main chat tabs --HG-- branch : develop --- .../gamedev/interfaces_v3/interaction.xml | 20 ++++++++++++++++++- .../client/src/interface_v3/chat_window.cpp | 9 +++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/interaction.xml b/code/ryzom/client/data/gamedev/interfaces_v3/interaction.xml index f4ab98453..90432bcff 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/interaction.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/interaction.xml @@ -1042,7 +1042,9 @@ h="24" posref="TL TL" x="0" - y="-4"> + y="-4" + max_w="0" + max_sizeref="w"> + + + + setHeaderColor(desc.HeaderColor); + + // because root group was created from template, element from scrollbar target attribute was not created yet + CInterfaceGroup *pIG = w->getContainer()->getGroup("header_opened:channel_select"); + if (pIG) + { + CCtrlScroll *sb = dynamic_cast(w->getContainer()->getCtrl("channel_scroll")); + if (sb) sb->setTarget(pIG); + } + return w; } else