mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
h
This commit is contained in:
@@ -614,6 +614,8 @@ public class HudUi {
|
||||
t.table(tt -> {
|
||||
tt.defaults().width(Scl.scl(23 * 8f * (settings.getInt("uiscaling") / 100f))).height(Scl.scl(4f * 8f * (settings.getInt("uiscaling") / 100f))).top();
|
||||
for(Element bar : bars){
|
||||
bar.setWidth(bar.getWidth() * (settings.getInt("uiscaling") / 100f));
|
||||
bar.setHeight(bar.getHeight() * (settings.getInt("uiscaling") / 100f));
|
||||
tt.add(bar).growX().left();
|
||||
tt.row();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Main extends Mod {
|
||||
Groups.unit.each(unit -> new FreeBar().draw(unit));
|
||||
|
||||
if(Core.settings.getBool("scan")){
|
||||
float range = settings.getInt("wavemax");
|
||||
float range = settings.getInt("rangemax") * 8f;
|
||||
|
||||
for(Team team : Team.all) {
|
||||
indexer.eachBlock(team, Core.input.mouseWorldX(), Core.input.mouseWorldY(), range, b -> true, b -> new FreeBar().draw(b));
|
||||
|
||||
@@ -165,7 +165,7 @@ public class Setting {
|
||||
addGraphicSetting("commandedunitui");
|
||||
addGraphicSetting("unithealthui");
|
||||
addGraphicTypeSetting("wavemax", 100, "@editmaxwave","@invalid", 200);
|
||||
addGraphicTypeSetting("rangemax", 10, "@editrange","@invalid", 1000);
|
||||
addGraphicTypeSetting("rangemax", 10, "@editrange","@invalid", 100);
|
||||
|
||||
ui.settings.graphics.sliderPref("coreuiscaling", 100, 0, 100, 5, s -> s + "%");
|
||||
ui.settings.graphics.sliderPref("waveuiscaling", 100, 0, 100, 5, s -> s + "%");
|
||||
|
||||
@@ -12,6 +12,8 @@ import arc.util.pooling.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.ui.Fonts;
|
||||
|
||||
import static arc.Core.settings;
|
||||
|
||||
public class SBar extends Element{
|
||||
private static Rect scissor = new Rect();
|
||||
|
||||
@@ -149,10 +151,11 @@ public class SBar extends Element{
|
||||
|
||||
Font font = Fonts.outline;
|
||||
GlyphLayout lay = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||
font.getData().setScale(Scl.scl() * (settings.getInt("uiscaling") / 100f));
|
||||
lay.setText(font, name);
|
||||
font.getData().setScale(Scl.scl());
|
||||
font.setColor(Color.white);
|
||||
font.draw(name, x + width / 2f - lay.width / 2f, y + height / 2f + lay.height / 2f + 1);
|
||||
font.getData().setScale(Scl.scl());
|
||||
|
||||
Pools.free(lay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user