diff --git a/assets/bundles/bundle.properties b/assets/bundles/bundle.properties index 766e093..1c02193 100644 --- a/assets/bundles/bundle.properties +++ b/assets/bundles/bundle.properties @@ -14,6 +14,7 @@ shar-stat.break = [red] broke [orange]{0}.[][] shar-stat.build = [green] built [orange]{0}.[][] # Settings +setting.ssim.name = Change Bar style [lightgray](made by ssim)[] setting.select.name = Display select Arrow setting.gaycursor.name = Enable mouse trail effect. only for desktop setting.wavemax.name = Wave Amount to display diff --git a/assets/bundles/bundle_ko.properties b/assets/bundles/bundle_ko.properties index 899bd09..9cee4a0 100644 --- a/assets/bundles/bundle_ko.properties +++ b/assets/bundles/bundle_ko.properties @@ -14,6 +14,7 @@ shar-stat.break = [lightgray] 가 [orange]{0}[]를 [red]철거[]했습니다.[] shar-stat.build = [lightgray] 가 [orange]{0}[]를 [green]건설[]했습니다.[] # Settings +setting.ssim.name = 바 스타일 변경 [lightgray](ssim님이 만듬)[] setting.select.name = 선택 화살표 표시 setting.gaycursor.name = PC 전용 마우스 꼬리효과 setting.wavemax.name = 표시할 단계 수 diff --git a/assets/sprites/ui/bar-top.9.png b/assets/sprites/ui/bar-top.9.png deleted file mode 100644 index c5049fe..0000000 Binary files a/assets/sprites/ui/bar-top.9.png and /dev/null differ diff --git a/assets/sprites/ui/bar.9.png b/assets/sprites/ui/bar.9.png deleted file mode 100644 index f2697f5..0000000 Binary files a/assets/sprites/ui/bar.9.png and /dev/null differ diff --git a/assets/sprites/ui/barSS-top.png b/assets/sprites/ui/barSS-top.png new file mode 100644 index 0000000..ff9fcfb Binary files /dev/null and b/assets/sprites/ui/barSS-top.png differ diff --git a/assets/sprites/ui/barSS.png b/assets/sprites/ui/barSS.png new file mode 100644 index 0000000..18da8e5 Binary files /dev/null and b/assets/sprites/ui/barSS.png differ diff --git a/src/UnitInfo/core/Setting.java b/src/UnitInfo/core/Setting.java index d0d5d36..a8289b8 100644 --- a/src/UnitInfo/core/Setting.java +++ b/src/UnitInfo/core/Setting.java @@ -149,6 +149,7 @@ public class Setting { boolean tmp = Core.settings.getBool("uiscalechanged", false); Core.settings.put("uiscalechanged", false); + addGraphicSetting("ssim"); addGraphicSetting("gaycursor"); addGraphicSetting("panfix"); addGraphicSetting("scan"); @@ -165,6 +166,7 @@ public class Setting { ui.settings.graphics.sliderPref("baropacity", 100, 0, 100, 5, s -> s + "%"); ui.settings.graphics.sliderPref("uiopacity", 50, 0, 100, 5, s -> s + "%"); + Core.settings.defaults("ssim", false); Core.settings.defaults("select", false); Core.settings.defaults("gaycursor", true); Core.settings.defaults("panfix", false); diff --git a/src/UnitInfo/ui/SBar.java b/src/UnitInfo/ui/SBar.java index 24b9cd5..adc2e36 100644 --- a/src/UnitInfo/ui/SBar.java +++ b/src/UnitInfo/ui/SBar.java @@ -84,12 +84,12 @@ public class SBar extends Element{ return this; } - public Drawable drawable(String name){ + public Drawable drawable(String name, int left, int right, int top, int bottom){ Drawable out; TextureAtlas.AtlasRegion region = Core.atlas.find(name); - int[] splits = {10,10,9,9}; + int[] splits = {left, right, top, bottom}; NinePatch patch = new NinePatch(region, splits[0], splits[1], splits[2], splits[3]); int[] pads = region.pads; if(pads != null) patch.setPadding(pads[0], pads[1], pads[2], pads[3]); @@ -101,6 +101,7 @@ public class SBar extends Element{ @Override public void draw(){ if(fraction == null || !valid) return; + boolean ssim = Core.settings.getBool("ssim"); float computed; try{ @@ -124,19 +125,19 @@ public class SBar extends Element{ blink = Mathf.lerpDelta(blink, 0f, 0.2f); value = Mathf.lerpDelta(value, computed, 0.05f); - NinePatchDrawable bar = (NinePatchDrawable) drawable("unitinfo-barS"); + NinePatchDrawable bar = ssim ? (NinePatchDrawable) drawable("unitinfo-barSS", 14, 14, 19, 19) : (NinePatchDrawable) drawable("unitinfo-barS", 10, 10, 9, 9); Draw.colorl(0.1f); bar.draw(x, y, width, height); Draw.color(color.cpy().mul(Pal.lightishGray), blinkColor, blink); - NinePatchDrawable top = (NinePatchDrawable) drawable("unitinfo-barS-top"); + NinePatchDrawable top = ssim ? (NinePatchDrawable) drawable("unitinfo-barSS-top", 14, 14, 19, 19) : (NinePatchDrawable) drawable("unitinfo-barS-top", 10, 10, 9, 9); float topWidth = width * value; - if(topWidth > Core.atlas.find("unitinfo-bar-top").width){ + if(topWidth > (ssim ? Core.atlas.find("unitinfo-barSS-top").width : Core.atlas.find("unitinfo-barS-top").width)){ top.draw(x, y, topWidth, height); }else{ if(ScissorStack.push(scissor.set(x, y, topWidth, height))){ - top.draw(x, y, Core.atlas.find("unitinfo-bar-top").width, height); + top.draw(x, y, (ssim ? Core.atlas.find("unitinfo-barSS-top").width : Core.atlas.find("unitinfo-barS-top").width), height); ScissorStack.pop(); } } @@ -144,11 +145,11 @@ public class SBar extends Element{ Draw.color(color, blinkColor, blink); float topWidthReal = width * (Math.min(value, computed)); - if(topWidthReal > Core.atlas.find("unitinfo-bar-top").width){ + if(topWidthReal > (ssim ? Core.atlas.find("unitinfo-barSS-top").width : Core.atlas.find("unitinfo-barS-top").width)){ top.draw(x, y, topWidthReal, height); }else{ if(ScissorStack.push(scissor.set(x, y, topWidthReal, height))){ - top.draw(x, y, Core.atlas.find("unitinfo-bar-top").width, height); + top.draw(x, y, (ssim ? Core.atlas.find("unitinfo-barSS-top").width : Core.atlas.find("unitinfo-barS-top").width), height); ScissorStack.pop(); } }