libui-rs / libui

Rust bindings to the minimalist, native, cross-platform UI toolkit `libui-ng`
Apache License 2.0
46 stars 5 forks source link

Added position controls #12

Closed chris-t-jansen closed 3 months ago

chris-t-jansen commented 3 months ago

Implemented three position-related functions for the Window struct: position, set_position, and the on_position_changed callback.

It's worth mentioning that I am very unsure on the details of how the callbacks work, so that I'm not super confident that on_position_changed is correct. However in testing, it seemed to be working as intended, so hopefully it's implemented properly and idiomatically.

nptr commented 3 months ago

Thanks a lot! I cherry picked the commit directly from your repo to rewrite the commit message. See commit 86138946d55. Merging this PR via Github is thus no longer necessary.

chris-t-jansen commented 3 months ago

Perfect, works for me!