Color custom blocks that are performing an operation.
This commit is contained in:
parent
ceee0db011
commit
f456b75030
@ -411,6 +411,9 @@ public class ProgramakerCustomBlockPart implements Part {
|
||||
if (pulseOutput != null) {
|
||||
pulseOutput.send(new Signal());
|
||||
}
|
||||
|
||||
// Notify screen that there's updates
|
||||
this._partGrid.update();
|
||||
}
|
||||
|
||||
private void freeBlock(String token) {
|
||||
@ -511,11 +514,18 @@ public class ProgramakerCustomBlockPart implements Part {
|
||||
return; // Logic block, don't show on user-mode
|
||||
}
|
||||
|
||||
boolean operationInProgress = this.token != null;
|
||||
|
||||
drawConnectors(canvas);
|
||||
drawWires(canvas, devMode);
|
||||
|
||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(Color.WHITE);
|
||||
if (operationInProgress) {
|
||||
paint.setColor(Color.YELLOW);
|
||||
}
|
||||
else {
|
||||
paint.setColor(Color.WHITE);
|
||||
}
|
||||
canvas.drawRect(
|
||||
new Rect(get_left(), get_top(),
|
||||
get_right(), get_bottom()),
|
||||
|
Loading…
Reference in New Issue
Block a user