mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
add new sprite
This commit is contained in:
@@ -288,6 +288,7 @@ public class Setting {
|
||||
addGraphicCheckSetting("select", false);
|
||||
addGraphicCheckSetting("unithealthui", true);
|
||||
addGraphicCheckSetting("ssim", false);
|
||||
addGraphicCheckSetting("shar", false);
|
||||
addGraphicCheckSetting("gaycursor", false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public class SBar extends Element{
|
||||
boolean valid = true;
|
||||
if(fraction == null || !valid) return;
|
||||
boolean ssim = Core.settings.getBool("ssim");
|
||||
boolean shar = Core.settings.getBool("shar");
|
||||
|
||||
float computed;
|
||||
try{
|
||||
@@ -81,12 +82,16 @@ public class SBar extends Element{
|
||||
blink = Mathf.lerpDelta(blink, 0f, 0.2f);
|
||||
value = Mathf.lerpDelta(value, computed, 0.05f);
|
||||
|
||||
NinePatchDrawable bar = ssim ? (NinePatchDrawable) drawable("unitinfo-barSS", 14, 14, 19, 19) : (NinePatchDrawable) drawable("unitinfo-barS", 10, 10, 9, 9);
|
||||
NinePatchDrawable bar = (NinePatchDrawable) drawable("unitinfo-barS", 10, 10, 9, 9);
|
||||
if(ssim) bar = (NinePatchDrawable) drawable("unitinfo-barSS", 14, 14, 19, 19);
|
||||
if(shar) bar = (NinePatchDrawable) drawable("unitinfo-barSSS", 25, 25, 17, 17);
|
||||
Draw.colorl(0.1f);
|
||||
bar.draw(x, y, width, height);
|
||||
Draw.color(color.cpy().mul(Pal.lightishGray), blinkColor, blink);
|
||||
|
||||
NinePatchDrawable top = ssim ? (NinePatchDrawable) drawable("unitinfo-barSS-top", 14, 14, 19, 19) : (NinePatchDrawable) drawable("unitinfo-barS-top", 10, 10, 9, 9);
|
||||
NinePatchDrawable top = (NinePatchDrawable) drawable("unitinfo-barS-top", 10, 10, 9, 9);
|
||||
if(ssim) top = (NinePatchDrawable) drawable("unitinfo-barSS-top", 14, 14, 19, 19);
|
||||
if(shar) top = (NinePatchDrawable) drawable("unitinfo-barSSS-top", 25, 25, 17, 17);
|
||||
float topWidth = width * value;
|
||||
|
||||
if(topWidth > (ssim ? Core.atlas.find("unitinfo-barSS-top").width : Core.atlas.find("unitinfo-barS-top").width)){
|
||||
|
||||
Reference in New Issue
Block a user