Mindustry icon indicating copy to clipboard operation
Mindustry copied to clipboard

Editor copy paste

Open jakubDoka opened this issue 4 years ago • 10 comments

Pull request introduces copy tool for editor. Offers rotation (j, k) and flipping (x, z). It also draws a selection rectangle. You copy by dragging with right mouse button, move by dragging inside selection with left mouse button, and paste by clicking of of selection. Mobile is not supported when i comes to transformation capability.

https://user-images.githubusercontent.com/60517552/109394794-20739d80-7929-11eb-9cfd-ef9cb3d6f0dd.mp4

Most painfull part was getting the power nodes woring, i had to make a small change to node configuration handling.

jakubDoka avatar Feb 27 '21 17:02 jakubDoka

I can't tell you how many times I've seen people (myself included) suggest a copy/paste feature in the editor over the years

ghost avatar Feb 27 '21 20:02 ghost

I think it is a good idea it will help a lot of map makers

CxZxRainzz avatar Feb 27 '21 21:02 CxZxRainzz

  • I can't zoom after a selection is made, which is very annoying.
  • Scrollwheel should not be used to rotate the selection.

It's bad right now because the scroll rotation implementation is incomplete. It should use the diagonal placement binding to override scroll to zoom instead of rotate when desired, same as how it works for rotating blocks in-game now.

Scroll is used to rotate everything else in Mindustry, so IMO it should stay.

joshuaptfan avatar Mar 01 '21 19:03 joshuaptfan

Scroll is used to rotate everything else in Mindustry, so IMO it should stay.

In my opinion, zooming is a lot more important in the editor, while rotation of selections is a lot less important. Rotation could be done with buttons or ctrl-scroll instead.

Anuken avatar Mar 01 '21 19:03 Anuken

In my opinion, zooming is a lot more important in the editor, while rotation of selections is a lot less important.

I think it's more important to maintain the established pattern of behavior, so that users don't have to learn/remember different ways to do things in different modes, than to weigh whether zoom or rotation is used more frequently.

When implemented properly, scroll will zoom until there is something to rotate, instead of only rotating. Perhaps I will have to PR this PR to get it working properly.

joshuaptfan avatar Mar 01 '21 19:03 joshuaptfan

i added the black rectangle and also a outline to selection between different blocks, all things except mobile controls are fixed, mobile is a research by it self Mindustry 02_03_2021 19_14_47

jakubDoka avatar Mar 02 '21 18:03 jakubDoka

added buttons for manipulation, on desktop too for conviniance, though it can be mobile only

https://user-images.githubusercontent.com/60517552/109764414-cbb77780-7bf3-11eb-85cf-ec4010881fd8.mp4

jakubDoka avatar Mar 03 '21 06:03 jakubDoka

i forgot that mobile cannot select anithing, but i cannot delet rewiev request, i em sorry is you got to this sooner then i managed to fix this issue

jakubDoka avatar Mar 03 '21 06:03 jakubDoka

lol mobile support: F to pay respect

WilloIzCitron avatar Mar 03 '21 07:03 WilloIzCitron

i have a general idea on how to support mobile but problem is that i em unable to test as android build gives this error

A problem occurred configuring project ':android'.
> Failed to notify project evaluation listener.
   > 'org.apache.http.entity.ContentType org.apache.http.entity.ContentType.create(java.lang.String, org.apache.http.NameValuePair[])'

jakubDoka avatar Mar 03 '21 08:03 jakubDoka