HeroEngine Support > GUI Creation

Bug Found in GUI Editor Save Code

(1/1)

FI-ScottZ:
I have noticed that when I use the GUI Editor, if I try to set a texture name into the material field of a control's alphamask AND set that alphamask size or position to anything non-zero, there is an error in the Console panel when I try to save the GUI:


--- Quote ---ERROR:HeroScript::HeroMachine::ScriptError:Bad XML: Missing starting <
--- End quote ---

If I only set the position/size OR only the material, it saves fine.

For instance, setting only material will result in a line like this:

--- Quote ---<alphamask material="SomeTexture.png"/>
--- End quote ---

Setting only size will result in lines like this:

--- Quote ---<alphamask>
  <size x="213" y="257"/>
</alphamask>
--- End quote ---

But if I set both size and material and try to save, it attempts to write lines like this:

--- Quote ---<alphamask>
  <size x="213" y="257"/> material="SomeTexture.png"
</alphamask>
--- End quote ---

You can see that the material setting is being placed after the size setting instead of immediately after the keyword "alphamask".  That results in the error since there is no "<" before "material".

I tried to read through the code to understand where it is going wrong, but could not track it down.  Anyways, it can be bypassed by manually writing the code properly in the xml file so that it looks like this:

--- Quote ---<alphamask material="SomeTexture.png">
  <size x="213" y="257"/>
</alphamask>
--- End quote ---

Just thought I should pass this along so it can be corrected in-engine at some point.

HE-CHRISTOPHER:
That does indeed seem like bad xml. 

I've added it to our issue tracking system, but since there is a workaround editing the guixml directly the priority is lower than other issues without a workaround.

Thanks for letting us know with a good reproduction.

Best,

Christopher

Navigation

[0] Message Index

Go to full version