mirror of
https://github.com/edubart/otclient.git
synced 2025-05-07 21:09:23 +02:00
More debug prints and avoid null pointer.
This commit is contained in:
parent
74979ca16a
commit
9e0ddb08e3
@ -257,7 +257,6 @@ end
|
|||||||
function UIMinimap:onStyleApply(styleName, styleNode)
|
function UIMinimap:onStyleApply(styleName, styleNode)
|
||||||
for name,value in pairs(styleNode) do
|
for name,value in pairs(styleNode) do
|
||||||
if name == 'autowalk' then
|
if name == 'autowalk' then
|
||||||
print(value)
|
|
||||||
self.autowalk = value
|
self.autowalk = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -447,9 +447,9 @@ UIWidgetPtr UIManager::createWidgetFromOTML(const OTMLNodePtr& widgetNode, const
|
|||||||
if(parent)
|
if(parent)
|
||||||
parent->addChild(widget);
|
parent->addChild(widget);
|
||||||
|
|
||||||
|
if(widget) {
|
||||||
widget->callLuaField("onCreate");
|
widget->callLuaField("onCreate");
|
||||||
|
|
||||||
if(widget) {
|
|
||||||
widget->setStyleFromNode(styleNode);
|
widget->setStyleFromNode(styleNode);
|
||||||
|
|
||||||
for(const OTMLNodePtr& childNode : styleNode->children()) {
|
for(const OTMLNodePtr& childNode : styleNode->children()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user