Wrap BeginGroup / EndGroup

This commit is contained in:
Malik Olivier Boussejra 2018-04-13 14:19:23 +00:00
parent 6515779000
commit 43ea9a9693

View File

@ -1166,4 +1166,13 @@ impl<'ui> Ui<'ui> {
sys::igIsItemActive()
}
}
/// Group items together as a single item.
///
/// May be useful to handle the same mouse event on a group of items, for example.
pub fn group<F: FnOnce()>(&self, f: F) {
unsafe { sys::igBeginGroup(); }
f();
unsafe { sys::igEndGroup(); }
}
}