teoxoy / factorio-blueprint-editor

A feature-rich Factorio Blueprint Editor
https://fbe.teoxoy.com
MIT License
299 stars 61 forks source link

[FEAT] Left-click and drag creation shouldn't leave gaps, and should constraint to horizontal/vertical #240

Closed KenCoder closed 2 years ago

KenCoder commented 2 years ago

I often find myself drawing belts like this:

image

If you left click and move the mouse too quickly, it skips spaces. Also, if you are trying to move horizontal, it's easy to 'drift' vertical (as shown above) which is rarely what you want.

Factorio handles this well - dragging belts or other items constraints to horizontal and fills in every square. I'd like to replicate that behavior - constrain painting to horizontal or vertical and ensure every square is filled in.

This is especially powerful when zoomed out - before it was very hard to draw a continuous belt, now it's easy. And FBE is better than factorio in this as there is no need for vision to work on large blueprints.

Note that right click and drag will also skip items. I thought about implementing the feature for it, but you don't want right click to be horizontal/vertically constrained. So I didn't implement it for that; I think it's fine because you have ctrl+right click do delete a region.

I have a working PR that implements this.