--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn 6 years ago
commit 425268e956

@ -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'

@ -175,6 +175,7 @@ namespace NLGUI
bool _CallingAH : 1; bool _CallingAH : 1;
bool _Cancelable : 1; // true if the slider may be cancelled when pressed on the mouse right button bool _Cancelable : 1; // true if the slider may be cancelled when pressed on the mouse right button
bool _Frozen : 1; bool _Frozen : 1;
bool _Scale : 1;
// For Target Scroller only: the target offset step in pixel. // For Target Scroller only: the target offset step in pixel.
sint32 _TargetStepX; sint32 _TargetStepX;

@ -68,6 +68,7 @@ namespace NLGUI
_StepValue = 0; _StepValue = 0;
_TileM = false; _TileM = false;
_Frozen = false; _Frozen = false;
_Scale = false;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -108,6 +109,11 @@ namespace NLGUI
return getTextureTopOrRight(); return getTextureTopOrRight();
} }
else else
if( name == "scale" )
{
return toString( _Scale );
}
else
if( name == "vertical" ) if( name == "vertical" )
{ {
return toString( _Vertical ); return toString( _Vertical );
@ -244,6 +250,14 @@ namespace NLGUI
return; return;
} }
else else
if( name =="scale" )
{
bool b;
if (fromString( value, b ) )
_Scale = b;
return;
}
else
if( name == "vertical" ) if( name == "vertical" )
{ {
bool b; bool b;
@ -408,6 +422,7 @@ namespace NLGUI
xmlSetProp( node, BAD_CAST "tx_bottomleft", BAD_CAST getTextureBottomOrLeft().c_str() ); 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_middle", BAD_CAST getTextureMiddle().c_str() );
xmlSetProp( node, BAD_CAST "tx_topright", BAD_CAST getTextureTopOrRight().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() ); xmlSetProp( node, BAD_CAST "vertical", BAD_CAST toString( _Vertical ).c_str() );
std::string align; std::string align;
@ -480,6 +495,10 @@ namespace NLGUI
if(prop) setTextureTopOrRight(string((const char*)prop)); if(prop) setTextureTopOrRight(string((const char*)prop));
else setTextureTopOrRight ("w_scroll_l0_t.tga"); 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 // Read properties
prop = (char*) xmlGetProp( node, (xmlChar*)"vertical" ); prop = (char*) xmlGetProp( node, (xmlChar*)"vertical" );
if (prop) _Vertical = convertBool((const char*)prop); if (prop) _Vertical = convertBool((const char*)prop);
@ -606,13 +625,13 @@ namespace NLGUI
if (_Vertical) if (_Vertical)
{ {
_W = w; if (!_Scale) _W = w;
_H = _Target->getMaxHReal(); _H = _Target->getMaxHReal();
} }
else else
{ {
_W = _Target->getMaxWReal(); _W = _Target->getMaxWReal();
_H = h; if (!_Scale) _H = h;
} }
CCtrlBase::updateCoords (); CCtrlBase::updateCoords ();

@ -214,7 +214,7 @@ int main(int argc, char **argv)
args.addArg("x", "extract", "", "Extract all interface elements from <output_filename> to <input_path>."); args.addArg("x", "extract", "", "Extract all interface elements from <output_filename> to <input_path>.");
args.addAdditionalArg("output_filename", "PNG or TGA file to generate", true); args.addAdditionalArg("output_filename", "PNG or TGA file to generate", true);
args.addAdditionalArg("input_path", "Path that containts interfaces elements", false); 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; if (!args.parse(argc, argv)) return 1;
@ -229,10 +229,10 @@ int main(int argc, char **argv)
} }
// //
uint borderSize = 0; uint borderSize = 1;
if (args.haveArg("b")) if (args.haveLongArg("no-border"))
{ {
borderSize = 1; borderSize = 0;
} }
// extract all interface elements // extract all interface elements

@ -319,6 +319,11 @@ InterfaceScale_min = 0.8;
InterfaceScale_max = 2.0; InterfaceScale_max = 2.0;
InterfaceScale_step = 0.05; 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 // Default values for map
MaxMapScale = 2.0; MaxMapScale = 2.0;
R2EDMaxMapScale = 8.0; R2EDMaxMapScale = 8.0;

@ -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")

@ -304,7 +304,7 @@ CClientConfig::CClientConfig()
InterfaceScale_min = 0.8f; InterfaceScale_min = 0.8f;
InterfaceScale_max = 2.0f; InterfaceScale_max = 2.0f;
InterfaceScale_step = 0.05; InterfaceScale_step = 0.05;
BilinearUI = false; BilinearUI = true;
VREnable = false; VREnable = false;
VRDisplayDevice = "Auto"; VRDisplayDevice = "Auto";

@ -1142,6 +1142,15 @@ CChatWindow *CChatWindowManager::createChatGroupWindow(const CChatWindowDesc &de
if (!desc.HeaderColor.empty()) if (!desc.HeaderColor.empty())
w->setHeaderColor(desc.HeaderColor); 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<CCtrlScroll*>(w->getContainer()->getCtrl("channel_scroll"));
if (sb) sb->setTarget(pIG);
}
return w; return w;
} }
else else

Loading…
Cancel
Save