mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 07:07:03 +07:00
Config previews
This commit is contained in:
parent
de77d80dab
commit
f188fbb567
@ -148,6 +148,14 @@ public class DesktopInput extends InputHandler{
|
||||
Draw.color();
|
||||
drawRequest(cursorX, cursorY, block, rotation);
|
||||
block.drawPlace(cursorX, cursorY, rotation, validPlace(cursorX, cursorY, block, rotation));
|
||||
|
||||
if(block.saveConfig && block.lastConfig != null){
|
||||
brequest.set(cursorX, cursorY, rotation, block);
|
||||
brequest.config = block.lastConfig;
|
||||
|
||||
block.drawRequestConfig(brequest, allRequests());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Draw.reset();
|
||||
|
@ -507,6 +507,13 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
|
||||
protected void drawRequest(BuildRequest request){
|
||||
request.block.drawRequest(request, allRequests(), validPlace(request.x, request.y, request.block, request.rotation));
|
||||
|
||||
if(request.block.saveConfig && request.block.lastConfig != null){
|
||||
Object conf = request.config;
|
||||
request.config = block.lastConfig;
|
||||
request.block.drawRequestConfig(request, allRequests());
|
||||
request.config = conf;
|
||||
}
|
||||
}
|
||||
|
||||
/** Draws a placement icon for a specific block. */
|
||||
|
Loading…
Reference in New Issue
Block a user