Slight cleanup
This commit is contained in:
@@ -70,36 +70,7 @@ public class UI implements ApplicationListener{
|
|||||||
public UI(){
|
public UI(){
|
||||||
Skin skin = new Skin(Core.atlas);
|
Skin skin = new Skin(Core.atlas);
|
||||||
generateFonts(skin);
|
generateFonts(skin);
|
||||||
{
|
loadExtraStyle(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);
|
|
||||||
}
|
|
||||||
|
|
||||||
skin.load(Core.files.internal("sprites/uiskin.json"));
|
skin.load(Core.files.internal("sprites/uiskin.json"));
|
||||||
|
|
||||||
for(BitmapFont font : skin.getAll(BitmapFont.class).values()){
|
for(BitmapFont font : skin.getAll(BitmapFont.class).values()){
|
||||||
@@ -125,6 +96,25 @@ public class UI implements ApplicationListener{
|
|||||||
loadCursors();
|
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(){
|
void loadCursors(){
|
||||||
int cursorScaling = 1, outlineThickness = 3;
|
int cursorScaling = 1, outlineThickness = 3;
|
||||||
Color outlineColor = Color.valueOf("444444");
|
Color outlineColor = Color.valueOf("444444");
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
cont.remove();
|
cont.remove();
|
||||||
buttons.remove();
|
buttons.remove();
|
||||||
|
|
||||||
menu = new Table("pane");
|
menu = new Table("button");
|
||||||
|
|
||||||
Consumer<SettingsTable> s = table -> {
|
Consumer<SettingsTable> s = table -> {
|
||||||
table.row();
|
table.row();
|
||||||
|
|||||||
Reference in New Issue
Block a user