Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08990598bc | ||
|
|
ab5ed4421c |
@@ -0,0 +1,2 @@
|
|||||||
|
/target
|
||||||
|
Cargo.lock
|
||||||
|
|||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "zxq5_egui"
|
name = "zxq5_egui"
|
||||||
edition.workspace = true
|
edition = "2024"
|
||||||
version.workspace = true
|
authors = ["zxq5"]
|
||||||
authors.workspace = true
|
version = "0.1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = "0.36.1"
|
egui = "0.36.1"
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
#![feature(trait_alias)]
|
|
||||||
#![feature(str_as_str)]
|
|
||||||
#![feature(inherent_associated_types)]
|
|
||||||
|
|
||||||
pub mod buttons;
|
pub mod buttons;
|
||||||
pub mod tabs;
|
pub mod tabs;
|
||||||
pub mod tree;
|
pub mod tree;
|
||||||
|
|||||||
+2
-2
@@ -86,7 +86,7 @@ where
|
|||||||
) {
|
) {
|
||||||
match tree.node() {
|
match tree.node() {
|
||||||
Node::Leaf(name) => {
|
Node::Leaf(name) => {
|
||||||
let response = egui::Button::new(name.as_str()).frame(false).ui(ui);
|
let response = egui::Button::new(name).frame(false).ui(ui);
|
||||||
|
|
||||||
response.context_menu(|ui| *action = ctx.ui(ui, tree));
|
response.context_menu(|ui| *action = ctx.ui(ui, tree));
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Node::Branch(name, children) => {
|
Node::Branch(name, children) => {
|
||||||
let show_response = egui::CollapsingHeader::new(name.as_str()).show(ui, |ui| {
|
let show_response = egui::CollapsingHeader::new(name).show(ui, |ui| {
|
||||||
for child in children.iter() {
|
for child in children.iter() {
|
||||||
Self::ui_inner(ui, action, ctx, child);
|
Self::ui_inner(ui, action, ctx, child);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user