mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 13:38:35 +00:00
Upgrade to cimgui/imgui 1.73
This commit is contained in:
parent
4833811950
commit
ae2f7d047c
@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to cimgui / imgui 1.73
|
||||
-
|
||||
### Removed
|
||||
|
||||
- Various things that were deprecated in imgui-rs 0.2.0
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
Minimum Rust version: 1.36
|
||||
|
||||
Wrapped Dear ImGui version: 1.72b
|
||||
Wrapped Dear ImGui version: 1.73
|
||||
|
||||
[](https://travis-ci.org/Gekkio/imgui-rs)
|
||||
[](https://crates.io/crates/imgui)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2
imgui-sys/third-party/cimgui
vendored
2
imgui-sys/third-party/cimgui
vendored
@ -1 +1 @@
|
||||
Subproject commit c0d75f6f8d6ddf7262576fb57e6096f188e807b8
|
||||
Subproject commit 1c65ee2bdc719fb3ef62b4615d66fe8effa21148
|
||||
@ -294,6 +294,10 @@ pub struct FontConfig {
|
||||
pub rasterizer_flags: u32,
|
||||
/// Brighten (>1.0) or darken (<1.0) font output
|
||||
pub rasterizer_multiply: f32,
|
||||
/// Explicitly specify the ellipsis character.
|
||||
///
|
||||
/// With multiple font sources the first specified ellipsis is used.
|
||||
pub ellipsis_char: Option<char>,
|
||||
pub name: Option<String>,
|
||||
}
|
||||
|
||||
@ -311,6 +315,7 @@ impl Default for FontConfig {
|
||||
glyph_max_advance_x: f32::MAX,
|
||||
rasterizer_flags: 0,
|
||||
rasterizer_multiply: 1.0,
|
||||
ellipsis_char: None,
|
||||
name: None,
|
||||
}
|
||||
}
|
||||
@ -329,6 +334,7 @@ impl FontConfig {
|
||||
raw.GlyphMaxAdvanceX = self.glyph_max_advance_x;
|
||||
raw.RasterizerFlags = self.rasterizer_flags;
|
||||
raw.RasterizerMultiply = self.rasterizer_multiply;
|
||||
raw.EllipsisChar = self.ellipsis_char.map(|x| x as u16).unwrap_or(0xffff);
|
||||
if let Some(name) = self.name.as_ref() {
|
||||
let bytes = name.as_bytes();
|
||||
let mut len = bytes.len().max(raw.Name.len() - 1);
|
||||
|
||||
@ -19,6 +19,7 @@ pub struct Font {
|
||||
config_data: *const sys::ImFontConfig,
|
||||
pub config_data_count: i16,
|
||||
pub fallback_char: sys::ImWchar,
|
||||
pub ellipsis_char: sys::ImWchar,
|
||||
pub scale: f32,
|
||||
pub ascent: f32,
|
||||
pub descent: f32,
|
||||
|
||||
@ -196,6 +196,10 @@ pub struct Io {
|
||||
///
|
||||
/// Windows without a title bar are not affected.
|
||||
pub config_windows_move_from_title_bar_only: bool,
|
||||
/// Compact window memory usage when unused.
|
||||
///
|
||||
/// Set to -1.0 to disable.
|
||||
pub config_windows_memory_compact_timer: f32,
|
||||
|
||||
pub(crate) backend_platform_name: *const c_char,
|
||||
pub(crate) backend_renderer_name: *const c_char,
|
||||
|
||||
@ -146,6 +146,14 @@ bitflags!(
|
||||
/// Use FramePadding (even for an unframed text node) to vertically align text baseline to
|
||||
/// regular widget height.
|
||||
const FramePadding = 1 << 10;
|
||||
/// Extend hit box to the right-most edge, even if not framed.
|
||||
///
|
||||
/// This is not the default in order to allow adding other items on the same line. In the
|
||||
/// future we may refactor the hit system to be front-to-back, allowing natural overlaps
|
||||
/// and then this can become the default.
|
||||
const SpanAvailWidth = 1 << 11;
|
||||
/// Extend hit box to the left-most and right-most edges (bypass the indented area)
|
||||
const SpanFullWidth = 1 << 12;
|
||||
const NavLeftJumpsBackHere = 1 << 13;
|
||||
|
||||
const CollapsingHeader =
|
||||
|
||||
@ -85,7 +85,7 @@ pub fn dear_imgui_version() -> &'static str {
|
||||
|
||||
#[test]
|
||||
fn test_version() {
|
||||
assert_eq!(dear_imgui_version(), "1.72b");
|
||||
assert_eq!(dear_imgui_version(), "1.73");
|
||||
}
|
||||
|
||||
impl Context {
|
||||
@ -583,6 +583,7 @@ pub enum Condition {
|
||||
#[repr(i32)]
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub enum Direction {
|
||||
None = sys::ImGuiDir_None,
|
||||
Left = sys::ImGuiDir_Left,
|
||||
Right = sys::ImGuiDir_Right,
|
||||
Up = sys::ImGuiDir_Up,
|
||||
|
||||
@ -16,6 +16,8 @@ bitflags!(
|
||||
const ALLOW_DOUBLE_CLICK = sys::ImGuiSelectableFlags_AllowDoubleClick;
|
||||
/// Cannot be selected, display greyed out text
|
||||
const DISABLED = sys::ImGuiSelectableFlags_Disabled;
|
||||
/// (WIP) Hit testing to allow subsequent willdgets to overlap this one
|
||||
const ALLOW_ITEM_OVERLAP = sys::ImGuiSelectableFlags_AllowItemOverlap;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user