diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..6e0f2b2a7 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,34 @@ +jobs: + - job: ubuntu16 + pool: + 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 + 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 + sudo apt-get install libcurl4-openssl-dev -y + displayName: 'Dependencies' + - script: | + mkdir build + 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 CMakeCache.txt + displayName: 'CMake' + - script: | + cd build + make -j`nproc` + displayName: 'Make' \ No newline at end of file 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 (); 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 diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index ee64b0b9d..c3391df4e 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -319,6 +319,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/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") - - diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index c77c9b656..497d9829b 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"; diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 1ac457240..4d9096e8c 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -1142,6 +1142,15 @@ CChatWindow *CChatWindowManager::createChatGroupWindow(const CChatWindowDesc &de if (!desc.HeaderColor.empty()) 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