Rust egui Settings Dashboard — Tabbed Panels & Persistence | Ep31

5views
00
13:18
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Build a tabbed settings dashboard in Rust using egui! In this episode, we create a settings dashboard with SidePanel tabs using selectable_value, persistent storage with serde and eframe Storage, a Settings struct with Default for reset, radio_value for theme selection, Slider for font size/volume/tab size, checkbox toggles, and a Reset All button. Student code: https://github.com/GoCelesteAI/egui_settings_dashboard What You'll Learn: - SidePanel::left() with selectable_value for tab navigation - Tab enum with PartialEq + Copy for selectable_value - Settings struct with Serialize, Deserialize, Clone - impl Default for Settings with sensible defaults - eframe persistence feature in Cargo.toml - CreationContext with cc.storage for loading saved state - eframe::get_value() to load settings from storage - eframe::set_value() to save settings on exit - fn save() override on eframe::App trait - APP_KEY const for storage key - radio_value() for Theme enum (Dark, Light, System) - egui::Slider::new() for font_size (10.0..=32.0) - egui::Slider::new() with .suffix("%") for volume - egui::Slider::new() for tab_size (2..=8) - ui.checkbox() for toggles (show_grid, notifications, sound_effects, word_wrap, line_numbers, auto_save) - TopBottomPanel::top for header with Reset All button - Layout::right_to_left for right-aligned Reset All - Settings::default() for Reset All functionality - match on Tab enum to render active settings panel - ctx.set_pixels_per_point(1.5) for readable UI - Neo-tree file browsing in a Rust project This is Episode 31 of the "Learn egui in Neovim" series — 36 episodes teaching Rust GUI development with egui, all coded in Neovim with Neo-tree. Chapters: 0:00 Intro 0:12 What We're Building 0:22 Preview: Key Concepts 0:54 Create Project & Dependencies 1:30 main.rs — Window Setup 2:10 app.rs — Theme Enum & Settings Struct 3:00 Default Implementation 3:40 Tab Enum & MyApp Struct 4:10 CreationContext — Loading Saved Settings 4:50 save() — Persisting Settings 5:20 update() — Header Panel with Reset All 6:00 SidePanel — Tab Navigation 6:40 CentralPanel — Tab Matching 7:10 Display Settings — Theme Radio & Font Slider 8:00 Audio Settings — Volume Slider & Checkboxes 8:40 Editor Settings — Tab Size & Toggles 9:20 Save & Review Code 9:50 cargo build 10:20 Neo-tree Browse 10:50 App Demo 11:50 Recap 12:30 Next Episode Tags: rust, egui, settings dashboard, gui, tutorial, neovim, neo-tree, eframe, persistence, serde, tabs, side panel, selectable_value, radio, slider, checkbox, settings, storage, save, reset, coding, programming, learn rust, rust gui, desktop app Hashtags: #rust #egui #settingsdashboard #gui #neovim #rustlang #coding #tutorial

Tags

rusteguisettings dashboardguitutorialneovimneo-treeeframepersistenceserdetabsside panelselectable_valueradioslider
Back to tutorials

Duration

13:18

Published

March 22, 2026

Added to Codegiz

March 23, 2026

Open in YouTube