Remove OtherCharAccess toggle from Scenario window when MD5 checks are disabled, close kaetemi/ryzomclassic#151

ryzomclassic-develop
kaetemi 4 years ago
parent 6853098df9
commit 2859693c1e

@ -382,7 +382,6 @@ namespace NLGUI
void dummySet(const std::string &value); void dummySet(const std::string &value);
public: public:
// export some properties // export some properties
REFLECT_EXPORT_START(CInterfaceElement, CReflectable) REFLECT_EXPORT_START(CInterfaceElement, CReflectable)
REFLECT_BOOL ("active", getActive, setActive); REFLECT_BOOL ("active", getActive, setActive);
@ -397,6 +396,7 @@ namespace NLGUI
REFLECT_SINT32 ("h_real", getHReal, dummySet); REFLECT_SINT32 ("h_real", getHReal, dummySet);
REFLECT_STRING ("id", getIdByValue, dummySet); REFLECT_STRING ("id", getIdByValue, dummySet);
REFLECT_STRING ("sizeref", getSizeRefAsString, setSizeRef); REFLECT_STRING ("sizeref", getSizeRefAsString, setSizeRef);
REFLECT_STRING ("posparent", getPosParent, setPosParent);
REFLECT_LUA_METHOD("updateCoords", luaUpdateCoords); REFLECT_LUA_METHOD("updateCoords", luaUpdateCoords);
REFLECT_LUA_METHOD("invalidateCoords", luaInvalidateCoords); REFLECT_LUA_METHOD("invalidateCoords", luaInvalidateCoords);
REFLECT_LUA_METHOD("invalidateContent", luaInvalidateContent); REFLECT_LUA_METHOD("invalidateContent", luaInvalidateContent);
@ -523,6 +523,8 @@ namespace NLGUI
void parseSizeParent( const std::string &id ); void parseSizeParent( const std::string &id );
void setSizeParent( const std::string &id ); void setSizeParent( const std::string &id );
void getSizeParent( std::string &id ) const; void getSizeParent( std::string &id ) const;
std::string getPosParent() const;
void setSerializable( bool b ){ serializable = b; } void setSerializable( bool b ){ serializable = b; }
bool IsSerializable() const{ return serializable; } bool IsSerializable() const{ return serializable; }

@ -437,6 +437,14 @@ namespace NLGUI
parseSizeRef(sizeref.c_str()); parseSizeRef(sizeref.c_str());
} }
// ------------------------------------------------------------------------------------------------
std::string CInterfaceElement::getPosParent() const
{
std::string id;
getPosParent(id);
return id;
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
std::string CInterfaceElement::getSizeRefAsString() const std::string CInterfaceElement::getSizeRefAsString() const
{ {

@ -78,6 +78,13 @@ function r2.ScenarioWindow:initScenarioWindow()
for k, type in pairs(tmp) do for k, type in pairs(tmp) do
lockCB:addText(type) lockCB:addText(type)
end end
if config.CheckR2ScenarioMD5 == 0 then
local lockGrp = scenarioWnd:find("locked")
local titleGrp = scenarioWnd:find("title")
lockGrp.active = false -- Hide lock group
titleGrp.posparent = lockGrp.posparent -- Rearrange
end
end end

Loading…
Cancel
Save