Skip to content

Commit

Permalink
specify selected logic block
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharlottes committed Nov 6, 2023
1 parent 0834f88 commit 1fa16e1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mlogjswatcher/ProcessorUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import arc.*;
import arc.util.*;
import arc.files.Fi;
import arc.graphics.g2d.*;

import mindustry.content.Fx;
import mindustry.graphics.Pal;
import mindustry.game.EventType;
import mindustry.world.blocks.logic.LogicBlock;

Expand All @@ -16,8 +18,19 @@ public static void init() {
Events.on(EventType.TapEvent.class, e -> {
if (e.tile.build instanceof LogicBlock.LogicBuild logicBuild) {
lastTappedLogicBuild = logicBuild;
} else {
lastTappedLogicBuild = null;
}
});

Events.run(EventType.Trigger.draw, () -> {
if(lastTappedLogicBuild == null) return;
Draw.reset();
Lines.stroke(1f);
Draw.color(Pal.accent);
Lines.poly(lastTappedLogicBuild.x, lastTappedLogicBuild.y, 4, 8f);
Draw.reset();
});
}

public static void InsertLogic() {
Expand Down

0 comments on commit 1fa16e1

Please sign in to comment.