Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an information label to the editor viewport to see the size of the selected Control #5288

Open
Chaosus opened this issue Aug 29, 2022 · 9 comments

Comments

@Chaosus
Copy link
Member

Chaosus commented Aug 29, 2022

Describe the project you are working on

Any project with UI and controls.

Describe the problem or limitation you are having in your project

I cannot see the size of the selected Control (when they are children of the parent Control) which is sometimes important to see for the design and place of other controls:

size

As you can see, the real size of the control is impossible to see using inspector. It can be obtained through code, but it's very uncomfortable.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add an information Label to the 2D editor.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I think the right fix should look like this:

image

If this enhancement will not be used often, can it be worked around with a few lines of script?

No

Is there a reason why this should be core and not an add-on in the asset library?

It's an editor enhancement.

@YuriSizov
Copy link
Contributor

YuriSizov commented Aug 29, 2022

See also #4464, but I like this idea more. Ideally, I'd probably like to see the size and visualized offsets as a part of the GUI gizmo, but we can start with a corner blurb. I like this.

That being said, this doesn't help with the remote view in running projects. But for that we may want to simply display all properties in the remote view, even if they are NO_EDITOR checked. Because this applies to other hidden properties as well, IMO.

@Calinou
Copy link
Member

Calinou commented Aug 29, 2022

This information could also be extended for selected Node2Ds.

I had a branch that displayed Node2D/Control dimensions along its selection rectangle, but I didn't have time to finish it so far: https://github.com/Calinou/godot/tree/2d-editor-display-selection-size

@me2beats
Copy link

I like the idea, this also could be optional (an option to disable/unable it in EditorSettings

@me2beats
Copy link

me2beats commented Aug 30, 2022

why this property is gone in Inspector in Godot 4 tho?

@YuriSizov
Copy link
Contributor

why this property is gone in Inspector in Godot 4 tho?

It's not gone. It's contextual. It's visible when you can edit it, and it's not visible when you can't. Same as some other related properties. This is done to streamline the experience of users who get confused by all the positioning and sizing options of controls, and different states based on parents that they can have.

@me2beats
Copy link

me2beats commented Aug 31, 2022

yea, I mean this:

it's not visible when you can't.

Can't it be still visible In inspector (maybe optionally) but just be marked as not editable?
The proposed info panel is fine for custom controls to quickly see some values, it also can allow adding multiple properties,
but for me it seems Inspector should still be the default place to inspect properties values.

Because someone wants to see rect_size, someone wants to see rect_position, someone - both, someone - none of them etc.
So I'm for #4464 as well

@me2beats
Copy link

me2beats commented Aug 31, 2022

btw sometimes I animate buttons positions inside containers.
So I even think some hidden properties like rect_position could be optionally editable from inspector

@YuriSizov
Copy link
Contributor

Can't it be still visible In inspector (maybe optionally) but just be marked as not editable?

The point is to reduce confusion. I'm afraid keeping things visible doesn't help with that, as the user is still overwhelmed with a bunch of fields they have no control over and that are not immediately useful.

So I even think some hidden properties like rect_position could be optionally editable from inspector

You should use intermediate controls for that. We cannot promote this workflow because it leads to issues and misunderstandings from users. Simply put, it's unsafe hence why it is disabled.

@me2beats
Copy link

The point is to reduce confusion. I'm afraid keeping things visible doesn't help with that, as the user is still overwhelmed with a bunch of fields they have no control over and that are not immediately useful.

I am for making it optional, and hidden by default, so newcomers won't have problems

You should use intermediate controls for that. We cannot promote this workflow because it leads to issues and misunderstandings from users. Simply put, it's unsafe hence why it is disabled.

Got the point. Adding intermediate controls makes the scene more confusing tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants