mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-13 22:48:34 +00:00
Upgrade to cimgui 1.66.2 / imgui 1.66
This commit is contained in:
parent
eea2c8b00e
commit
0440752e0b
@ -8,7 +8,7 @@
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to cimgui 1.65.2 / imgui 1.65. **This is a very big update, so there
|
||||
- Upgrade to cimgui 1.66.2 / imgui 1.66. **This is a very big update, so there
|
||||
are a lot of breaking changes**
|
||||
|
||||
## [0.0.21] - 2018-10-11
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
Minimum Rust version: 1.26
|
||||
|
||||
Wrapped Dear ImGui version: 1.65
|
||||
Wrapped Dear ImGui version: 1.66
|
||||
|
||||
[](https://travis-ci.org/Gekkio/imgui-rs)
|
||||
[](https://crates.io/crates/imgui)
|
||||
|
||||
@ -378,10 +378,12 @@ bitflags!(
|
||||
const NoCollapse = 1 << 5;
|
||||
/// Resize every window to its content every frame.
|
||||
const AlwaysAutoResize = 1 << 6;
|
||||
/// Disable drawing background color (WindowBg, etc.) and outside border
|
||||
const NoBackground = 1 << 7;
|
||||
/// Never load/save settings in .ini file.
|
||||
const NoSavedSettings = 1 << 8;
|
||||
/// Disable catching mouse or keyboard inputs;hovering test with pass through.
|
||||
const NoInputs = 1 << 9;
|
||||
/// Disable catching mouse, hovering test with pass through.
|
||||
const NoMouseInputs = 1 << 9;
|
||||
/// Has a menu-bar.
|
||||
const MenuBar = 1 << 10;
|
||||
/// Allow horizontal scrollbar to appear (off by default).
|
||||
@ -405,5 +407,9 @@ bitflags!(
|
||||
const NoNavFocus = 1 << 19;
|
||||
|
||||
const NoNav = ImGuiWindowFlags::NoNavInputs.bits | ImGuiWindowFlags::NoNavFocus.bits;
|
||||
const NoDecoration = ImGuiWindowFlags::NoTitleBar.bits | ImGuiWindowFlags::NoResize.bits
|
||||
| ImGuiWindowFlags::NoScrollbar.bits | ImGuiWindowFlags::NoCollapse.bits;
|
||||
const NoInputs = ImGuiWindowFlags::NoMouseInputs.bits | ImGuiWindowFlags::NoNavInputs.bits
|
||||
| ImGuiWindowFlags::NoNavFocus.bits;
|
||||
}
|
||||
);
|
||||
|
||||
@ -316,10 +316,19 @@ extern "C" {
|
||||
pub fn igGetScrollMaxY() -> c_float;
|
||||
pub fn igSetScrollX(scroll_x: c_float);
|
||||
pub fn igSetScrollY(scroll_y: c_float);
|
||||
pub fn igSetScrollHere(center_y_ratio: c_float);
|
||||
pub fn igSetScrollHereY(center_y_ratio: c_float);
|
||||
pub fn igSetScrollFromPosY(pos_y: c_float, center_y_ratio: c_float);
|
||||
}
|
||||
|
||||
#[deprecated(
|
||||
since = "0.0.22",
|
||||
note = "please use igSetScrollHereY instead"
|
||||
)]
|
||||
#[allow(non_snake_case)]
|
||||
pub unsafe fn igSetScrollHere(center_y_ratio: c_float) {
|
||||
igSetScrollHereY(center_y_ratio)
|
||||
}
|
||||
|
||||
// Parameter stacks (shared)
|
||||
extern "C" {
|
||||
pub fn igPushFont(font: *mut ImFont);
|
||||
@ -652,6 +661,7 @@ extern "C" {
|
||||
v_rad: *mut c_float,
|
||||
v_degrees_min: c_float,
|
||||
v_degrees_max: c_float,
|
||||
format: *const c_char,
|
||||
) -> bool;
|
||||
pub fn igSliderInt(
|
||||
label: *const c_char,
|
||||
@ -1082,6 +1092,7 @@ extern "C" {
|
||||
flags: ImGuiDragDropFlags,
|
||||
) -> *const ImGuiPayload;
|
||||
pub fn igEndDragDropTarget();
|
||||
pub fn igGetDragDropPayload() -> *const ImGuiPayload;
|
||||
}
|
||||
|
||||
// Clipping
|
||||
|
||||
@ -116,7 +116,7 @@ pub struct ImFont {
|
||||
pub display_offset: ImVec2,
|
||||
pub glyphs: ImVector<ImFontGlyph>,
|
||||
pub index_advance_x: ImVector<c_float>,
|
||||
pub index_lookup: ImVector<c_ushort>,
|
||||
pub index_lookup: ImVector<ImWchar>,
|
||||
pub fallback_glyph: *const ImFontGlyph,
|
||||
pub fallback_advance_x: c_float,
|
||||
pub fallback_char: ImWchar,
|
||||
@ -875,11 +875,6 @@ extern "C" {
|
||||
pub fn ImDrawData_ScaleClipRects(this: *mut ImDrawData, sc: ImVec2);
|
||||
}
|
||||
|
||||
// ImFontConfig
|
||||
extern "C" {
|
||||
pub fn ImFontConfig_DefaultConstructor(config: *mut ImFontConfig);
|
||||
}
|
||||
|
||||
// ImFontAtlas
|
||||
extern "C" {
|
||||
pub fn ImFontAtlas_AddFont(
|
||||
@ -1039,7 +1034,7 @@ extern "C" {
|
||||
size: c_float,
|
||||
pos: ImVec2,
|
||||
col: ImU32,
|
||||
c: c_ushort,
|
||||
c: ImWchar,
|
||||
);
|
||||
pub fn ImFont_RenderText(
|
||||
this: *mut ImFont,
|
||||
|
||||
2
imgui-sys/third-party/cimgui
vendored
2
imgui-sys/third-party/cimgui
vendored
@ -1 +1 @@
|
||||
Subproject commit 3efb1001aa4639676b5626eaaf2c58e1370be3b2
|
||||
Subproject commit 204f2828bb81857ffa4b9e2dbc360eabbb7cbd25
|
||||
@ -1,6 +1,7 @@
|
||||
use std::f32;
|
||||
use std::marker::PhantomData;
|
||||
use std::mem;
|
||||
use std::os::raw::{c_int, c_void};
|
||||
use std::os::raw::{c_float, c_int, c_void};
|
||||
use std::ptr;
|
||||
use sys;
|
||||
|
||||
@ -203,8 +204,9 @@ impl ImFontConfig {
|
||||
|
||||
fn make_config(self) -> sys::ImFontConfig {
|
||||
let mut config = unsafe {
|
||||
let mut config = mem::uninitialized();
|
||||
sys::ImFontConfig_DefaultConstructor(&mut config);
|
||||
let mut config = mem::zeroed::<sys::ImFontConfig>();
|
||||
config.font_data_owned_by_atlas = true;
|
||||
config.glyph_max_advance_x = f32::MAX as c_float;
|
||||
config
|
||||
};
|
||||
config.size_pixels = self.size_pixels;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user