v0.3.4: even further layout improvements to wndItem
This commit is contained in:
parent
560070fcd0
commit
36c396359d
|
@ -110,7 +110,7 @@ public class RedButton extends Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
public float reqWidth() {
|
public float reqWidth() {
|
||||||
return text.width() + 2.5f;
|
return text.width() + 2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float reqHeight() {
|
public float reqHeight() {
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class WndItem extends Window {
|
||||||
btn.setSize( Math.max( BUTTON_WIDTH, btn.reqWidth() ), BUTTON_HEIGHT );
|
btn.setSize( Math.max( BUTTON_WIDTH, btn.reqWidth() ), BUTTON_HEIGHT );
|
||||||
if (x + btn.width() > width) {
|
if (x + btn.width() > width) {
|
||||||
x = 0;
|
x = 0;
|
||||||
y += BUTTON_HEIGHT + GAP;
|
y += BUTTON_HEIGHT + 1;
|
||||||
}
|
}
|
||||||
btn.setPos( x, y );
|
btn.setPos( x, y );
|
||||||
add( btn );
|
add( btn );
|
||||||
|
@ -87,7 +87,7 @@ public class WndItem extends Window {
|
||||||
btn.textColor( TITLE_COLOR );
|
btn.textColor( TITLE_COLOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
x += btn.width() + GAP;
|
x += btn.width() + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user