Browse Source

Fix luainvaders template warnings

Michael Ragazzon 4 năm trước cách đây
mục cha
commit
b866c72380
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      Samples/luainvaders/data/window.rml
  2. 1 1
      Source/Core/XMLNodeHandlerBody.cpp

+ 1 - 1
Samples/luainvaders/data/window.rml

@@ -19,6 +19,6 @@ function Window.LoadMenu(name,document)
 end
 	</script>
 </head>
-<body template="window" onload="Window.OnWindowLoad(document)">
+<body template="window">
 </body>
 </template>

+ 1 - 1
Source/Core/XMLNodeHandlerBody.cpp

@@ -56,7 +56,7 @@ Element* XMLNodeHandlerBody::ElementStart(XMLParser* parser, const String& RMLUI
 		for (auto& pair : attributes)
 		{
 			Variant* attribute = document->GetAttribute(pair.first);
-			if (attribute && *attribute != pair.second)
+			if (attribute && *attribute != pair.second && pair.first != "template")
 			{
 				Log::Message(Log::LT_WARNING, "Overriding attribute '%s' in element %s during template injection.", pair.first.c_str(), element->GetAddress().c_str());
 			}