#Container size in editor doesn't match size in code

1 messages · Page 1 of 1 (latest)

solid wagon
#

Got a bit of a doozy here; I have code that depends on the size of a PanelContainer (it's a custom tooltip that I want to display at an arbitrary place on the screen). However, the PanelContainer size in code doesn't match its visuals or its size property in the editor. Any ideas what is causing this discrepancy?

#

Another thing: If I throw a breakpoint on that print line, then the size is actually (220, 462) for that frame -- but when I resume, the size immediately goes down to 166. The custom minimum size for the PanelContainer is (220, 140).

#

Here's another thing: If I call the print statement via call_deferred, the size.y shoots up to 1659 before returning to 166. I can hack my way around this by using await Engine.get_main_loop().process_frame but I'd really rather not!