Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Dragged object becomes invisible if you bring the cursor over an UI element in the sub editor

Open MaaiG opened this issue 2 years ago • 8 comments

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [ ] My issue happened while using mods.

What happened?

When you drag objects, they become invisible when you move the cursor into the object window, the property window, the context window.

https://user-images.githubusercontent.com/93348499/174587960-136874ff-383b-49c5-a616-55b85e099845.mp4

Reproduction steps

  1. Editor
  2. Drag your object with the mouse
  3. Cross one of the specified windows

Bug prevalence

Happens every time I play

Version

0.18.12.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

MaaiG avatar Jun 20 '22 11:06 MaaiG

Fixed in https://github.com/Regalis11/Barotrauma-development/commit/4c86427b6c663e09f3b82b48226c92335b781f3d

Regalis11 avatar Jul 03 '22 12:07 Regalis11

Tested on 0.19.0.0, works correctly but with a note.

the item still goes invisible (when part of it should still be visible under the UI) and this fix makes it so it becomes visible again instead of drawing it behind the UI elements onscreen, it does fix the issues of course of it never becoming visible again until you let go. this is most visible when dragging over the top left or bottom elements which are somewhat transparent.

Additionally - if you let go over one of those elements, it does not place the item at that location, but where you next move the mouse that is not directly over a UI element, is this behavior worth improving / making a separate issue on?

NilanthAnimosus avatar Jul 21 '22 04:07 NilanthAnimosus

if you let go over one of those elements, it does not place the item at that location, but where you next move the mouse that is not directly over a UI element, is this behavior worth improving / making a separate issue on?

In principle, this is quite convenient... Especially if changing the properties of copy of the object will apply only to it.

Does v0.19.0.0. change copy of the object properties or both (copy of an object and source object)?

MaaiG avatar Jul 21 '22 09:07 MaaiG

I don't strictly understand the convenience of what you describe myself, but I also admittedly do not create submarines only edit existing ones at best. you are editing the original object you are dragging - when you drag it into the UI and go editing settings you are live-editing that particular object (And it is still there, just hidden behind the UI at best). it would make more sense to copy the object to its new destination then edit that, then to drag an existing object and edit it on the fly then let go.

It would probably take very fundamental changes to the editor given the UI edits the object in real time, visible or not to have it edit your copy when you have yet to create said copy from the original by letting go of it. I think after the fixes from #9512 that behavior is also likely to change I think if it works some other way like multiple selection-yet-not as your selecting a new object (Which has actually been fixed in that other issue now).

If I had to guess, 0.19.0.0 changes both. meanwhile a future version from 0.19.0.0 will only change the first (Not the copy) with how you drag it into the UI if it creates a new item during the drag (But thats pure guesswork...and I don't get why you wouldn't edit the copy and make copies from that, over editing it before you place it and the original...just copy and edit both or one?) ... otherwise it would probably still just edit both. there is probably no good/sane way about making it not edit an item as you edit all its properties and then apply them later on selecting nothing/something else. or real reason to

NilanthAnimosus avatar Jul 21 '22 09:07 NilanthAnimosus

I don't strictly understand the convenience of what you describe

Maybe this saves 1 click by mouse )). But seriously, you are right!

I am not talking about the mandatory need for such a function. We can do without it. I just mentioned that when I stumbled upon this dragging behavior, I wondered - if there was any idea!?

instead of drawing it behind the UI elements onscreen,

I just wanted to say that this behavior might make sense if the properties window worked like a buffer. But, of course, there is no great benefit and no point in having such a buffer tool. (I apologize for my English. :)

MaaiG avatar Jul 21 '22 13:07 MaaiG

I just don't understand what you mean by a buffer. I assume as in to store a copy of an item you already spawned - but the item you already spawned is effectively a copy you can keep reusing is all. just feels like an extra step to what is already available that provides no benefit (?) to the sub creator. if you set one item up you can copy paste it to your hearts content, as well as multiple-edit any number of item, im a personal fan of just copy pasting everything but drag duplication is doable when you hold a key down. that includes multiple selection duplication.

how do you save a mouseclick from a 1 click (drag and release) action by dragging it onto the UI? you still did the first (and only?) mouse click even in the video...I just don't understand it I think.

NilanthAnimosus avatar Jul 21 '22 13:07 NilanthAnimosus

You’re right, there’s absolutely no point. I’ve been working with the subeditor for too long and I was visited by the bad muse. ;) I need more rest from the PC... :) Don’t have to do anything. (I again apologize for my bad English)

MaaiG avatar Jul 21 '22 14:07 MaaiG

Made some additional fixes to this bug in https://github.com/Regalis11/Barotrauma-development/pull/3497/commits/867c1622ddaa23acacb69e90ac057fe257681507

juanjp600 avatar Aug 03 '22 19:08 juanjp600

Tested, I didn't notice any issues with this. Closing.

Rokvach avatar Aug 22 '22 13:08 Rokvach