Slight cleanup

This commit is contained in:
Anuken
2019-07-04 23:40:19 -04:00
parent a7a565b93e
commit 2c5546c6fb
2 changed files with 21 additions and 31 deletions

View File

@@ -70,36 +70,7 @@ public class UI implements ApplicationListener{
public UI(){
Skin skin = new Skin(Core.atlas);
generateFonts(skin);
{
AtlasRegion region = Core.atlas.find("flat-down-base");
int[] splits = region.splits;
ScaledNinePatchDrawable copy = new ScaledNinePatchDrawable(new NinePatch(region, splits[0], splits[1], splits[2], splits[3])){
public float getLeftWidth(){
return 0;
}
public float getRightWidth(){
return 0;
}
public float getTopHeight(){
return 0;
}
public float getBottomHeight(){
return 0;
}
};
copy.setMinWidth(0);
copy.setMinHeight(0);
copy.setTopHeight(0);
copy.setRightWidth(0);
copy.setBottomHeight(0);
copy.setLeftWidth(0);
skin.add("flat-down", copy, Drawable.class);
}
loadExtraStyle(skin);
skin.load(Core.files.internal("sprites/uiskin.json"));
for(BitmapFont font : skin.getAll(BitmapFont.class).values()){
@@ -125,6 +96,25 @@ public class UI implements ApplicationListener{
loadCursors();
}
void loadExtraStyle(Skin skin){
AtlasRegion region = Core.atlas.find("flat-down-base");
int[] splits = region.splits;
ScaledNinePatchDrawable copy = new ScaledNinePatchDrawable(new NinePatch(region, splits[0], splits[1], splits[2], splits[3])){
public float getLeftWidth(){ return 0; }
public float getRightWidth(){ return 0; }
public float getTopHeight(){ return 0; }
public float getBottomHeight(){ return 0; }
};
copy.setMinWidth(0);
copy.setMinHeight(0);
copy.setTopHeight(0);
copy.setRightWidth(0);
copy.setBottomHeight(0);
copy.setLeftWidth(0);
skin.add("flat-down", copy, Drawable.class);
}
void loadCursors(){
int cursorScaling = 1, outlineThickness = 3;
Color outlineColor = Color.valueOf("444444");

View File

@@ -54,7 +54,7 @@ public class SettingsMenuDialog extends SettingsDialog{
cont.remove();
buttons.remove();
menu = new Table("pane");
menu = new Table("button");
Consumer<SettingsTable> s = table -> {
table.row();