Open FireCatMagic opened 2 months ago
What stylebox are you talking about being displayed? I can't find anything like this, and window doesn't have a canvas item like this
What stylebox are you talking about being displayed? I can't find anything like this, and window doesn't have a canvas item like this
"embedded_border" and "embedded_focus_border" It allows you to draw a stylebox under the window I assume that internally there is a canvasitem to render this, unless for some reason there isn't and i'm dumb
There isn't an item for it like that, it's handled by the parent viewport and entirely internal, window doesn't know about it
There isn't an item for it like that, it's handled by the parent viewport and entirely internal, window doesn't know about it
I guess then this proposal thing is just a way to somehow get access to it I'm not sure how it's drawn if it doesn't have a canvasitem RID
The window itself doesn't have any RID, the RID is in the viewport that embeds it, so the window can't access it, it's internal to the viewport that contains it, extracting it would be complicated
Describe the project you are working on
3D Platformer, but this case is just a thing with stylizing a settings menu.
Describe the problem or limitation you are having in your project
Windows can have styleboxes, which makes them display the said stylebox. I'd like to add a material to this purple panel to give it stripes for some extra stylization. Problem is, I can't access the CanvasItem that is drawing it. If I could get the RID, i could use RenderingServer.canvas_item_set_material to set the material.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Exposing the CanvasItem RID would at the minimum allow me to put a material on it.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There could be a "get_canvas_item_rid" function or something that returns it, but only if the window is embedded to display a stylebox.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I've searched through the Window class to see if I could somehow grab the RID of the displayed CanvasItem, but to my knowledge I cannot.
Is there a reason why this should be core and not an add-on in the asset library?
There isn't a way to access the drawn CanvasItem of a window