mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-27 13:28:28 +00:00
Merge pull request #529 from sanbox-irl/feature-gate-tables-api
decided to feature gate the tables API
This commit is contained in:
commit
5f441b7b1d
@ -13,6 +13,6 @@ publish = false
|
|||||||
clipboard = "0.5"
|
clipboard = "0.5"
|
||||||
glium = { version = "0.30", default-features = true }
|
glium = { version = "0.30", default-features = true }
|
||||||
image = "0.23"
|
image = "0.23"
|
||||||
imgui = { path = "../imgui" }
|
imgui = { path = "../imgui", features = ["tables-api"] }
|
||||||
imgui-glium-renderer = { path = "../imgui-glium-renderer" }
|
imgui-glium-renderer = { path = "../imgui-glium-renderer" }
|
||||||
imgui-winit-support = { path = "../imgui-winit-support" }
|
imgui-winit-support = { path = "../imgui-winit-support" }
|
||||||
|
|||||||
@ -23,6 +23,9 @@ default = ["min-const-generics"]
|
|||||||
wasm = ["imgui-sys/wasm"]
|
wasm = ["imgui-sys/wasm"]
|
||||||
freetype = ["imgui-sys/freetype"]
|
freetype = ["imgui-sys/freetype"]
|
||||||
min-const-generics = []
|
min-const-generics = []
|
||||||
|
# this api is in beta in the upstream imgui crate. See issue #524 for more info.
|
||||||
|
# it should be stable and fine to use though.
|
||||||
|
tables-api = []
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
memoffset = "0.6"
|
memoffset = "0.6"
|
||||||
|
|||||||
@ -34,6 +34,8 @@ pub use self::render::renderer::*;
|
|||||||
pub use self::stacks::*;
|
pub use self::stacks::*;
|
||||||
pub use self::string::*;
|
pub use self::string::*;
|
||||||
pub use self::style::*;
|
pub use self::style::*;
|
||||||
|
|
||||||
|
#[cfg(feature = "tables-api")]
|
||||||
pub use self::tables::*;
|
pub use self::tables::*;
|
||||||
pub use self::utils::*;
|
pub use self::utils::*;
|
||||||
pub use self::widget::color_editors::*;
|
pub use self::widget::color_editors::*;
|
||||||
@ -77,6 +79,7 @@ mod popups;
|
|||||||
mod render;
|
mod render;
|
||||||
mod stacks;
|
mod stacks;
|
||||||
mod style;
|
mod style;
|
||||||
|
#[cfg(feature = "tables-api")]
|
||||||
mod tables;
|
mod tables;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test;
|
mod test;
|
||||||
@ -289,6 +292,9 @@ impl<T> From<*mut T> for Id<'static> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Id<'a> {
|
impl<'a> Id<'a> {
|
||||||
|
// this is used in the tables-api and possibly elsewhere,
|
||||||
|
// but not with just default features...
|
||||||
|
#[allow(dead_code)]
|
||||||
fn as_imgui_id(&self) -> sys::ImGuiID {
|
fn as_imgui_id(&self) -> sys::ImGuiID {
|
||||||
unsafe {
|
unsafe {
|
||||||
match self {
|
match self {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user