godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

Fix incorrect notice about XDG paths working on all platforms in Data paths

Open Calinou opened this issue 1 year ago • 13 comments

They are only effective on Linux/*BSD. (For reference, in most other apps, it's rare for XDG environment variables to have an effect on other platforms.)

  • See https://github.com/godotengine/godot-docs-user-notes/discussions/106#discussioncomment-10757552.

Calinou avatar Sep 26 '24 23:09 Calinou

@ator-dev, here is the re-implementation of your PR on master If you have some spare cycles I would really appreciate if you can test it and verify that I capture properly all your intentions.

pafuent avatar Sep 27 '24 03:09 pafuent

I like it, but it may be more useful if we can scroll the view with Ctrl + Arrow keys when the focus style is drawn ie. the ScrollContainer or one of it's children has focus, also you will need to accept the events to avoid focusing another child when the ctrl is pressed.

WhalesState avatar Sep 28 '24 13:09 WhalesState

I like it, but it may be more useful if we can scroll the view with Ctrl + Arrow keys when the focus style is drawn ie. the ScrollContainer or one of it's children has focus, also you will need to accept the events to avoid focusing another child when the ctrl is pressed.

Should I add this in this PR or in another? To be honest, I tried to do it to see if the change is small and decide if I should create a new PR, but my knowledge about Godot GUI is pretty limited and the result that I got was not satisfactory.

pafuent avatar Sep 30 '24 11:09 pafuent

Should I add this in this PR or in another? To be honest, I tried to do it to see if the change is small and decide if I should create a new PR, but my knowledge about Godot GUI is pretty limited and the result that I got was not satisfactory.

It's ok, I think i can do it later since we can't rely on gui_input() when a child is focused, this will require a new variable focused and a scroll_page to define how much we should scroll when a key is pressed and to use shortcut_input, so i don't think it will be merged to 4.x if we apply all those changes at once.

WhalesState avatar Sep 30 '24 12:09 WhalesState

Great to see this discussion and thanks for the reimplementation PR!

If you have some spare cycles I would really appreciate if you can test it and verify that I capture properly all your intentions.

I'm sorry, although I mean to, I'm really busy at the moment. What's most important is that the result is accessible and doesn't affect anything weirdly.

ator-dev avatar Sep 30 '24 21:09 ator-dev

I'm sorry, although I mean to, I'm really busy at the moment. What's most important is that the result is accessible and doesn't affect anything weirdly.

No problem!

pafuent avatar Oct 01 '24 02:10 pafuent

Note: The focus StyleBox is clipped for the default theme, this should be documented that it will require a focus StyleBox to be drawn without expanding and adding some content margin for the ScrollContainer panel style to avoid drawing the focus StyleBox behind the children.

Edit: I see you're not using the default focus style for the ScrollContainer, so in both cases, you will need to document this since the users will not be able to see the focus style box because it's empty when they enable this feature.

WhalesState avatar Oct 02 '24 16:10 WhalesState

Note: The focus StyleBox is clipped for the default theme, this should be documented that it will require a focus StyleBox to be drawn without expanding and adding some content margin for the ScrollContainer panel style to avoid drawing the focus StyleBox behind the children.

Could you please elaborate this? I'm still too new to Godot GUI.

Edit: I see you're not using the default focus style for the ScrollContainer, so in both cases, you will need to document this since the users will not be able to see the focus style box because it's empty when they enable this feature.

When you say that I should add/update documentation, Are you talking about this file, right?

I'm wondering where I could document the use set_draw_focus_border because that method is public but is not bind/exposed to Godot Engine users. It's not clear to me if this method will be available through GDExtension just because the method is public. If that is the case, Where I should document that GDExtension new method? If not, Will be enough if I add a comment in the C++ code?

pafuent avatar Oct 03 '24 02:10 pafuent

One more change is to check if (Engine::get_singleton()->is_editor_hint()) inside ScrollContainer cpp file to avoid running the code when we run a scene in editor builds.

WhalesState avatar Oct 03 '24 05:10 WhalesState

One more change is to check if (Engine::get_singleton()->is_editor_hint()) inside ScrollContainer cpp file to avoid running the code when we run a scene in editor builds.

Done

pafuent avatar Oct 03 '24 20:10 pafuent

@AThousandShips sorry if I tag you wrongly, but this CI job is being running for more than 5 hours. I know I can "stop" it submitting a new commit into the PR, and I'll do it soon, but I would like to let you know because you could set a configuration on GitHub or something to kill stuck CI actions.

image

pafuent avatar Oct 04 '24 02:10 pafuent

@WhalesState I addressed all your comments, please let me know if I capture properly all your requests.

pafuent avatar Oct 04 '24 02:10 pafuent

@pafuent Please don't tag random people

Zireael07 avatar Oct 04 '24 07:10 Zireael07

Friendly remainder

pafuent avatar Nov 13 '24 03:11 pafuent

Why is this editor-only? This makes the newly added focus property useless at runtime.

EDIT: No, it's entirely useless, because set_draw_focus_border() is not exposed. If there is a good reason to be like that, it should be mentioned in the docs. But I think it's fine to allow this at runtime.

KoBeWi avatar Nov 13 '24 23:11 KoBeWi

It's editor only because that was the initial intent on https://github.com/godotengine/godot/pull/59362 and I was hesitant to try to make it available at runtime because I didn't know if that required an special process to follow that. I'll try to see if I can make it working on runtime.

pafuent avatar Nov 19 '24 03:11 pafuent

If you want it editor-only, it should be a new type that isn't exposed. Adding things to ScrollContainer that can't be used is not the right solution.

KoBeWi avatar Nov 19 '24 12:11 KoBeWi

I think I got it working. ScrollContainerFocusOnRuntime

pafuent avatar Nov 20 '24 03:11 pafuent

Tested and it seems to work correctly. ScrollContainer does not need to be focused to display the border, so I think the focus change to the inspector is not needed. Could be nice to have some default focus style in default theme, you could copy some existing one.

KoBeWi avatar Nov 20 '24 14:11 KoBeWi

@KoBeWi sorry but I'm not getting this:

ScrollContainer does not need to be focused to display the border, so I think the focus change to the inspector is not needed.

pafuent avatar Nov 20 '24 17:11 pafuent

Thanks!

akien-mga avatar Nov 29 '24 21:11 akien-mga