Improve a little the case of the relaod button
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8704 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a94fa2d764
commit
a74485f890
@ -1,11 +1,14 @@
|
||||
<stkgui>
|
||||
|
||||
<icon-button id="back" x="0" y="0" height="8%" icon="gui/back.png"/>
|
||||
<button id="reload" x="-1" y="0" height="5%" text="Reload" />
|
||||
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row" >
|
||||
|
||||
<header text_align="center" width="80%" text="SuperTuxKart Addons" align="center"/>
|
||||
<div x="0" y="0" width="100%" height="fit" layout="horizontal-row" height="8%">
|
||||
<icon-button id="back" height="100%" icon="gui/back.png"/>
|
||||
<header text_align="center" proportion="1" text="SuperTuxKart Addons" align="center"/>
|
||||
<button id="reload" text="Reload" />
|
||||
</div>
|
||||
|
||||
<spacer height="15" width="10"/>
|
||||
|
||||
<tabs id="category" height="10%" max_height="110" width="90%" align="center">
|
||||
|
@ -118,7 +118,7 @@ void LayoutManager::readCoords(Widget* self)
|
||||
int abs_x = -1, percent_x = -1;
|
||||
if (convertToCoord(x, &abs_x, &percent_x ))
|
||||
{
|
||||
if (abs_x > -1) self->m_absolute_x = abs_x;
|
||||
if (abs_x >= 0) self->m_absolute_x = abs_x;
|
||||
else if (abs_x < -1) self->m_absolute_reverse_x = abs(abs_x);
|
||||
else if (percent_x > -1) self->m_relative_x = (float)percent_x;
|
||||
}
|
||||
@ -129,7 +129,7 @@ void LayoutManager::readCoords(Widget* self)
|
||||
int abs_y = -1, percent_y = -1;
|
||||
if (convertToCoord(y, &abs_y, &percent_y ))
|
||||
{
|
||||
if (abs_y > -1) self->m_absolute_y = abs_y;
|
||||
if (abs_y >= 0) self->m_absolute_y = abs_y;
|
||||
else if (abs_y < -1) self->m_absolute_reverse_y = abs(abs_y);
|
||||
else if (percent_y > -1) self->m_relative_y = (float)percent_y;
|
||||
}
|
||||
@ -271,7 +271,7 @@ void LayoutManager::applyCoords(Widget* self, AbstractTopLevelContainer* topLeve
|
||||
}
|
||||
|
||||
if (self->m_absolute_x > -1) self->m_x = parent_x + self->m_absolute_x;
|
||||
else if (self->m_absolute_reverse_x > -1) self->m_x = parent_x + (parent_h - self->m_absolute_reverse_x);
|
||||
else if (self->m_absolute_reverse_x > -1) self->m_x = parent_x + (parent_w - self->m_absolute_reverse_x);
|
||||
else if (self->m_relative_x > -1) self->m_x = (int)(parent_x + parent_w*self->m_relative_x/100);
|
||||
|
||||
if (self->m_absolute_y > -1) self->m_y = parent_y + self->m_absolute_y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user