mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
revive arrow
This commit is contained in:
@@ -12,6 +12,7 @@ shar-stat.liquidAmmo = Liquid: {0}
|
||||
shar-stat.power = Power: {0} / {1}
|
||||
|
||||
# Settings
|
||||
setting.select.name = Display select Arrow
|
||||
setting.gaycursor.name = Enable mouse trail effect. only for desktop
|
||||
setting.wavemax.name = Wave Amount to display
|
||||
setting.rangemax.name = Block Scan Range
|
||||
|
||||
@@ -12,6 +12,7 @@ shar-stat.liquidAmmo = 액체: {0}
|
||||
shar-stat.power = 전력: {0} / {1}
|
||||
|
||||
# Settings
|
||||
setting.select.name = 선택 화살표 표시
|
||||
setting.gaycursor.name = PC 전용 마우스 꼬리효과
|
||||
setting.wavemax.name = 표시할 단계 수
|
||||
setting.rangemax.name = 블록 스캔 사거리
|
||||
|
||||
@@ -2,9 +2,11 @@ package UnitInfo.core;
|
||||
|
||||
import UnitInfo.ui.SBar;
|
||||
import arc.Core;
|
||||
import arc.Events;
|
||||
import arc.func.Func;
|
||||
import arc.graphics.Color;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.Angles;
|
||||
import arc.math.Mathf;
|
||||
import arc.scene.Element;
|
||||
import arc.scene.style.TransformDrawable;
|
||||
@@ -24,6 +26,7 @@ import mindustry.content.StatusEffects;
|
||||
import mindustry.entities.abilities.ForceFieldAbility;
|
||||
import mindustry.entities.abilities.ShieldRegenFieldAbility;
|
||||
import mindustry.entities.units.WeaponMount;
|
||||
import mindustry.game.EventType;
|
||||
import mindustry.game.SpawnGroup;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.Pal;
|
||||
@@ -76,6 +79,21 @@ public class HudUi {
|
||||
else return unit;
|
||||
}
|
||||
|
||||
public void setDraw(){
|
||||
Events.run(EventType.Trigger.draw, () -> {
|
||||
if(!Core.settings.getBool("select")) return;
|
||||
Unit unit = getUnit();
|
||||
|
||||
for(int i = 0; i < 4; i++){
|
||||
float rot = i * 90f + 45f + (-Time.time) % 360f;
|
||||
float length = unit.hitSize * 1.5f + 2.5f;
|
||||
Draw.color(Tmp.c1.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time, 2f, 1f)).a(settings.getInt("uiopacity") / 100f));
|
||||
Draw.rect("select-arrow", unit.x + Angles.trnsx(rot, length), unit.y + Angles.trnsy(rot, length), length / 1.9f, length / 1.9f, rot - 135f);
|
||||
Draw.reset();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addTable(){
|
||||
mainTable = new Table(table -> {
|
||||
table.left();
|
||||
|
||||
@@ -36,6 +36,7 @@ public class Main extends Mod {
|
||||
hud.addWaveTable();
|
||||
hud.addUnitTable();
|
||||
hud.addTable();
|
||||
hud.setDraw();
|
||||
});
|
||||
|
||||
Events.on(WorldLoadEvent.class, e -> {
|
||||
|
||||
@@ -159,6 +159,7 @@ public class Setting {
|
||||
addGraphicSetting("panfix");
|
||||
addGraphicSetting("scan");
|
||||
addGraphicSetting("range");
|
||||
addGraphicSetting("select");
|
||||
addGraphicSetting("infoui");
|
||||
addGraphicSetting("weaponui");
|
||||
addGraphicSetting("commandedunitui");
|
||||
@@ -166,6 +167,7 @@ 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("baropacity", 100, 0, 100, 5, s -> s + "%");
|
||||
ui.settings.graphics.sliderPref("uiopacity", 50, 0, 100, 5, s -> s + "%");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user