gui: more lua support + 'coord' renamed to 'pos'
This commit is contained in:
@@ -25,8 +25,8 @@ static void _readUINode(UiXmlReader& reader, xml::xmlelement element, UINode& no
|
||||
if (element->has("id")) {
|
||||
node.setId(element->attr("id").getText());
|
||||
}
|
||||
if (element->has("coord")) {
|
||||
node.setCoord(element->attr("coord").asVec2());
|
||||
if (element->has("pos")) {
|
||||
node.setCoord(element->attr("pos").asVec2());
|
||||
}
|
||||
if (element->has("size")) {
|
||||
node.setSize(element->attr("size").asVec2());
|
||||
|
||||
@@ -571,7 +571,7 @@ void Hud::draw(const GfxContext& ctx){
|
||||
|
||||
glm::vec2 invSize = inventoryView->getSize();
|
||||
inventoryView->setCoord(glm::vec2(
|
||||
glm::min(width/2-invSize.x/2, width-caWidth-10-invSize.x),
|
||||
glm::min(width/2-invSize.x/2, width-caWidth-10-invSize.x),
|
||||
height/2-invSize.y/2
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user