mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
ssim bar
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = 표시할 단계 수
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 258 B |
Binary file not shown.
|
Before Width: | Height: | Size: 243 B |
BIN
assets/sprites/ui/barSS-top.png
Normal file
BIN
assets/sprites/ui/barSS-top.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 270 B |
BIN
assets/sprites/ui/barSS.png
Normal file
BIN
assets/sprites/ui/barSS.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 284 B |
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user