cost 170 ms
Rust Egui,如何設置標題的顏色?

[英]Rust Egui, how do i set the color of a heading?

我正在嘗試在我的 Rust egui 代碼中創建一個標題並將其顏色設置為白色,但我不確定如何操作。 我的代碼當前包含一個 function render_date,它使用 colored_label function 在屏幕上以白色文本顯示日期字符串。 但是,我希望這段文字也可以作為標題。 這是我 ...

預期的可變引用 `&mut egui::ui::Ui` 發現可變引用 `&mut Ui` 不應該發生

[英]expected mutable reference `&mut egui::ui::Ui` found mutable reference `&mut Ui` should not be happening

這是我用作添加圖像參考的回購協議: https://github.com/emilk/egui/blob/master/examples/retained_image/src/main.rs 嘗試在這行代碼中將圖像繪制到屏幕時出現此錯誤: “不匹配的類型預期可變引用&mut egui::u ...

我怎么可能不能使用這個 function?

[英]How is it possible that i cant use this function?

使用這個 github repo 作為參考: https://github.com/emilk/egui/blob/master/examples/retained_image/src/main.rs 我試圖使用 egui_extras::RetainedImage 將圖像加載到我的框架中,但它給 ...


排序:
質量:
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM