[cimgui 1.53.1] Rename Ui::show_test_window to Ui::show_demo_window

This commit is contained in:
Malik Olivier Boussejra 2018-04-29 17:51:07 +09:00
parent 817ecc2005
commit cf15d49e36
4 changed files with 14 additions and 3 deletions

View File

@ -3,6 +3,7 @@
## [Unreleased]
- Upgrade to imgui/cimgui 1.53.1
- Rename `Ui::show_test_window` to `Ui::show_demo_window`.
## [0.0.18] - 2017-12-23

View File

@ -9,7 +9,7 @@ const CLEAR_COLOR: [f32; 4] = [0.2, 0.2, 0.2, 1.0];
fn main() {
support::run("test_window.rs".to_owned(), CLEAR_COLOR, |ui| {
let mut open = true;
ui.show_test_window(&mut open);
ui.show_demo_window(&mut open);
open
});
}

View File

@ -860,12 +860,18 @@ extern "C" {
// Demo/Debug/Info
extern "C" {
pub fn igShowTestWindow(opened: *mut bool);
pub fn igShowDemoWindow(opened: *mut bool);
pub fn igShowMetricsWindow(opened: *mut bool);
pub fn igShowStyleEditor(style: *mut ImGuiStyle);
pub fn igShowUserGuide();
}
#[allow(non_snake_case)]
#[deprecated(since = "0.0.19", note = "please use igShowDemoWindow instead")]
pub unsafe fn igShowTestWindow(opened: *mut bool) {
igShowDemoWindow(opened)
}
// Window
extern "C" {
pub fn igBegin(name: *const c_char, open: *mut bool, flags: ImGuiWindowFlags) -> bool;

View File

@ -421,9 +421,13 @@ impl<'ui> Ui<'ui> {
sys::igShowStyleEditor(style as *mut ImGuiStyle);
}
}
#[deprecated(since = "0.0.19", note = "please use show_demo_window instead")]
pub fn show_test_window(&self, opened: &mut bool) {
self.show_demo_window(opened)
}
pub fn show_demo_window(&self, opened: &mut bool) {
unsafe {
sys::igShowTestWindow(opened);
sys::igShowDemoWindow(opened);
}
}
pub fn show_metrics_window(&self, opened: &mut bool) {