mirror of
https://github.com/obsqrbtz/egui_knob.git
synced 2026-04-08 20:19:17 +03:00
updated example
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -825,7 +825,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "egui_knob"
|
name = "egui_knob"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"eframe",
|
"eframe",
|
||||||
"egui",
|
"egui",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "egui_knob"
|
name = "egui_knob"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "A simple knob widget for egui"
|
description = "A simple knob widget for egui"
|
||||||
homepage = "https://github.com/obsqrbtz/egui_knob"
|
homepage = "https://github.com/obsqrbtz/egui_knob"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ To use the Knob widget in your project, add the following to your `Cargo.toml`:
|
|||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = "0.32"
|
egui = "0.32"
|
||||||
egui_knob = "0.3.1"
|
egui_knob = "0.4.1"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage example
|
## Usage example
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ struct KnobDemo {
|
|||||||
impl Default for KnobDemo {
|
impl Default for KnobDemo {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
values: [f32::NAN; 6], // Initialize with NaN to test NaN handling
|
values: [f32::NAN; 6],
|
||||||
show_bg_arc: true,
|
show_bg_arc: true,
|
||||||
show_filled: true,
|
show_filled: true,
|
||||||
use_step: false,
|
use_step: false,
|
||||||
@@ -36,7 +36,7 @@ impl Default for KnobDemo {
|
|||||||
impl eframe::App for KnobDemo {
|
impl eframe::App for KnobDemo {
|
||||||
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
||||||
egui::CentralPanel::default().show(ctx, |ui| {
|
egui::CentralPanel::default().show(ctx, |ui| {
|
||||||
ui.heading("🎛 egui-knob Showcase");
|
ui.heading("🎛 egui-knob example");
|
||||||
ui.separator();
|
ui.separator();
|
||||||
|
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
|
|||||||
Reference in New Issue
Block a user