Questions tagged [egui]

egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust.

47 questions
0
votes
1 answer

egui::Ui::button().clicked isn't working in a for loop

I'm trying to create remove folder button in my app. But ui.button(text).clicked isn't working in a for loop. "Remove" buttons are in each folder. use eframe::{App, egui, Frame, NativeOptions, run_native}; use eframe::egui::{CentralPanel, Color32,…
Vecrix
  • 5
  • 1
0
votes
1 answer

Can't edit egui::TextEdit::singleline() text in eframe

I want to create a selectable and editable title for a folder in eframe/egui with the function egui::TextEdti::singleline(). But it needs mutable reference to string (&mut String). If I declare a variable in the function like this: let response =…
Vecrix
  • 5
  • 1
0
votes
0 answers

How well does eframe persistence scale vertically

I am writing a Japanese learning application using egui and the Wanikani API, and am planning to cache (a lot of) data locally - 11 tables and thousands of records in most tables. Will egui's built in persistence (which uses RON and serde) be enough…
Jemsurfer
  • 21
  • 5
0
votes
0 answers

Switch windows in immediate gui

I have 2 structs that represent different windows. Each have its own implementation where window layout described. How to make window switch on button click? I am using EGui but if you have experience with other ui's, like Dear ImGui, I will also…
Mbroo
  • 29
  • 5
0
votes
0 answers

Connecting to MongoDB using egui in Rust gives 'Server selection timeout' error for home page - how to fix?

I am using egui to make GUI for my rust application using mongodb atlas . The problem is that the app connects to mongodb for signup and login page but for the home page it gives the following error. Failed to get user: Kind: Server selection…
glitch_123
  • 139
  • 12
0
votes
1 answer

Spawn (mutlibe) widgets/elements using rust egui

I'm writing a calendar like todo app using Rust egui with eframe. Each todo is a combination of different widgets (text_edit_singleline and two buttons) How do I add a new todo when pressing a third button. Thank you in advance. I already tried to…
Mujk
  • 1
  • 1
0
votes
1 answer

Egui empty scroll that scrolls infinite

I am looking for a way how I can get a infinity scroll in egui. I dont want to add items to it because its supposed to be infinite. I rather want an empty scroll that is empty and scrolls infinite. Based on that I want to offset the content…
filif96770
  • 55
  • 5
0
votes
1 answer

rust compiler error: process didn't exit successfully: `target\debug\TestApp.exe` (exit code: 101)

I'm creating a EGUI app with eframe and i've been testing it and compiling it to both WASM and windows. Recently it stopped compiling to windows(exe) due to this error. error: process didn't exit successfully: `target\debug\TestApp.exe` (exit code:…
0
votes
1 answer

How can I change the value of a label in egui after creating it?

I am trying to change the string inside an egui label using a function. I made a reference to the content of the label and passed it along to the function but it doesn't change what is displayed in the application. let mut label_text = "Change…
0
votes
0 answers

Is there a way to auto resize the CentralPanel of egui(0.21.0)?

I am very new to Egui and gui making and am trying to make a application for windows, but I wanted to auto resize the CentralPanel according to the ui widgets inside of that panel, is there a way to do that? (If I am not able to resize the central…
0
votes
1 answer

egui::TextEdit::singleline with macroquad - not able to edit text

Trying to experiment with egui and macroquad, but can't get elements enabled for edit. From the standard example: use macroquad::prelude::*; #[macroquad::main("")] async fn main() { loop { clear_background(BLACK); …
0
votes
1 answer

egui interaction with background thread

My goal is to have a background thread counting up every second, which can be started and stopped by buttons on the UI. The gui should display the current time. I thought that the communication between the gui and the background thread could be done…
tlhenvironment
  • 319
  • 2
  • 10
0
votes
0 answers

Why cant i allocate a texture to the GPU memmory?

i am trying to import a backdrop for my application and using a image as that backdrop, but cant seem to get it to work. Im using this example on loading images in;…
0
votes
1 answer

Egui display an editable 3x3 matrix?

I am trying to show the 9 cells of a 3x3 matrix using egui. I want a 3x3 grid that matches the entries in the matrix. So far I have this: Where the two numbers are the (0,0) and (0, 1) entries in the matrix, but I want them side by side. I got them…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
1 answer

How to access egui/eframe values from other widgets?

If I have a widget, say a checkbox, in a panel in an egui/frame application, and I want something in a different panel whose behaviour depends on the value of that checkbox, is there either a direct way of accessing this value from one widget to the…
palako
  • 3,342
  • 2
  • 23
  • 33