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) {
|
if (pulseOutput != null) {
|
||||||
pulseOutput.send(new Signal());
|
pulseOutput.send(new Signal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify screen that there's updates
|
||||||
|
this._partGrid.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void freeBlock(String token) {
|
private void freeBlock(String token) {
|
||||||
@ -511,11 +514,18 @@ public class ProgramakerCustomBlockPart implements Part {
|
|||||||
return; // Logic block, don't show on user-mode
|
return; // Logic block, don't show on user-mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean operationInProgress = this.token != null;
|
||||||
|
|
||||||
drawConnectors(canvas);
|
drawConnectors(canvas);
|
||||||
drawWires(canvas, devMode);
|
drawWires(canvas, devMode);
|
||||||
|
|
||||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
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(
|
canvas.drawRect(
|
||||||
new Rect(get_left(), get_top(),
|
new Rect(get_left(), get_top(),
|
||||||
get_right(), get_bottom()),
|
get_right(), get_bottom()),
|
||||||
|
Loading…
Reference in New Issue
Block a user