mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
shadow
This commit is contained in:
@@ -12,6 +12,7 @@ import arc.util.Time;
|
||||
import arc.util.Tmp;
|
||||
import mindustry.Vars;
|
||||
import mindustry.content.Fx;
|
||||
import mindustry.content.UnitTypes;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.Team;
|
||||
import mindustry.gen.Building;
|
||||
|
||||
@@ -167,13 +167,14 @@ public class Setting {
|
||||
addGraphicTypeSetting("wavemax", 100, "@editmaxwave","@invalid", 200);
|
||||
addGraphicTypeSetting("rangemax", 10, "@editrange","@invalid", 100);
|
||||
|
||||
ui.settings.graphics.sliderPref("selectopacity", 50, 0, 100, 5, s -> s + "%");
|
||||
ui.settings.graphics.sliderPref("selectopacity", 25, 0, 100, 5, s -> s + "%");
|
||||
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("select", false);
|
||||
Core.settings.defaults("gaycursor", true);
|
||||
Core.settings.defaults("panfix", false);
|
||||
Core.settings.defaults("scan", true);
|
||||
Core.settings.defaults("scan", false);
|
||||
Core.settings.defaults("range", false);
|
||||
Core.settings.defaults("infoui", true);
|
||||
Core.settings.defaults("weaponui", true);
|
||||
|
||||
@@ -18,6 +18,7 @@ import mindustry.gen.*;
|
||||
import mindustry.graphics.Drawf;
|
||||
import mindustry.graphics.Layer;
|
||||
import mindustry.graphics.Pal;
|
||||
import mindustry.graphics.Trail;
|
||||
import mindustry.type.Item;
|
||||
import mindustry.type.Liquid;
|
||||
import mindustry.ui.Cicon;
|
||||
|
||||
@@ -10,6 +10,7 @@ import arc.scene.style.*;
|
||||
import arc.scene.ui.layout.Scl;
|
||||
import arc.util.pooling.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.Pal;
|
||||
import mindustry.ui.Fonts;
|
||||
|
||||
import static arc.Core.settings;
|
||||
@@ -128,12 +129,12 @@ public class SBar extends Element{
|
||||
if(Float.isInfinite(computed)) computed = 1f;
|
||||
|
||||
blink = Mathf.lerpDelta(blink, 0f, 0.2f);
|
||||
value = Mathf.lerpDelta(value, computed, 0.15f);
|
||||
value = Mathf.lerpDelta(value, computed, 0.05f);
|
||||
|
||||
NinePatchDrawable bar = (NinePatchDrawable) drawable("unitinfo-barS");
|
||||
Draw.colorl(0.1f);
|
||||
bar.draw(x, y, width, height);
|
||||
Draw.color(color, blinkColor, blink);
|
||||
Draw.color(color.cpy().mul(Pal.lightishGray), blinkColor, blink);
|
||||
|
||||
NinePatchDrawable top = (NinePatchDrawable) drawable("unitinfo-barS-top");
|
||||
float topWidth = width * value;
|
||||
@@ -147,6 +148,18 @@ public class SBar extends Element{
|
||||
}
|
||||
}
|
||||
|
||||
Draw.color(color, blinkColor, blink);
|
||||
float topWidthReal = width * computed;
|
||||
|
||||
if(topWidthReal > Core.atlas.find("unitinfo-bar-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);
|
||||
ScissorStack.pop();
|
||||
}
|
||||
}
|
||||
|
||||
Draw.color();
|
||||
|
||||
Font font = Fonts.outline;
|
||||
|
||||
Reference in New Issue
Block a user