hoffstadt / hoffstadt/DearPyGui
when window collapsed dpg.get_item_pos (dpg.get_item_...) doesnt work
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
when i collapse a window the function get_item_pos or is_item_hovered doesnt update or work like it should in my sight.
seems like a bug to me.
need a workaround for my overlay im doing maybe someone knows where i can get the window_pos when the window is collapsed/not visible.
below is an example code, it shows the item state in the console.
when u collapse the window (collapsed=True) it doesnt show the updated cordinate for the window when u move it.
not collapsed works fine.
sorry for my bad english and thanks for future help
```python
import dearpygui.dearpygui as dpg
import threading
import time
def main():
dpg.create_context()
with dpg.window(label="Example Window", width=500, height=150, tag="example window", collapsed=False):
dpg.add_text("Hello, world")
dpg.create_viewport(title='Custom Title', width=600, height=200)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
def example():
time.sleep(1)
while True:
x,y=dpg.get_item_pos("example window")
width=dpg.get_item_width("example window")
height=dpg.get_item_height("example window")
print(x,y,"|",width,"|",height)
print(dpg.is_item_hovered("example window"))
if __name__=="__main__":
a= threading.Thread(target=main)
a.start()
b= threading.Thread(target=example)
b.start()
```
Contributor guide
Assessment
This issue has not been assessed yet.