egui Dropdown Menus in Rust — ComboBox + FontId + RichText | Ep 13
5views
0010:17
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Build a font preview app with dropdown menus using egui ComboBox. Learn how to create selectable dropdowns with
from_id_salt, render text with custom fonts using FontId and RichText, and organize your UI with enums for
type-safe state management.
Student code: https://github.com/GoCelesteAI/egui_combobox
What You'll Learn:
- egui::ComboBox::from_id_salt for dropdown menus
- selected_text and selectable_value for combo box options
- FontId::new to combine font size and family
- RichText::new to render text with custom fonts
- Enum-based state with label() and conversion methods
- TopBottomPanel, SidePanel, and CentralPanel layout
- Neo-tree: press m to move or rename files
Series: Learn egui in Neovim
Episode 13 of 32
Timestamps:
0:00 Intro
0:12 App Preview
0:22 What We'll Use
0:54 Create Project
1:06 Cargo.toml
1:30 main.rs
2:10 app.rs — FontStyle Enum
3:28 FontSize Enum
4:28 MyApp Struct & Default
5:14 App Trait — Top Panel
5:36 SidePanel — ComboBox
6:42 Preview Text Input
7:08 CentralPanel — FontId & RichText
8:08 Save & Build
8:42 Neo-tree Move Demo
9:02 App Demo
10:02 Recap
#rust #egui #rustlang #neovim #gui #tutorial #programming #combobox