avatar.rs - icy_draw - icy_draw is the successor to mystic draw. fork / mirror
 (HTM) git clone https://git.drkhsh.at/icy_draw.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       avatar.rs (1965B)
       ---
            1 use eframe::egui::{self, Ui};
            2 use i18n_embed_fl::fl;
            3 use icy_engine::{SaveOptions, ScreenPreperation};
            4 
            5 pub fn create_settings_page(ui: &mut Ui, options: &mut SaveOptions) {
            6     ui.vertical(|ui| {
            7         ui.horizontal(|ui| {
            8             ui.label(fl!(crate::LANGUAGE_LOADER, "export-video-preparation-label"));
            9 
           10             let label = match options.screen_preparation {
           11                 ScreenPreperation::None => {
           12                     fl!(crate::LANGUAGE_LOADER, "export-video-preparation-None")
           13                 }
           14                 ScreenPreperation::ClearScreen => {
           15                     fl!(crate::LANGUAGE_LOADER, "export-video-preparation-Clear")
           16                 }
           17                 ScreenPreperation::Home => {
           18                     fl!(crate::LANGUAGE_LOADER, "export-video-preparation-Home")
           19                 }
           20             };
           21 
           22             egui::ComboBox::from_id_source("screen_prep_combo")
           23                 .selected_text(label)
           24                 .width(150.)
           25                 .show_ui(ui, |ui| {
           26                     ui.selectable_value(
           27                         &mut options.screen_preparation,
           28                         ScreenPreperation::None,
           29                         fl!(crate::LANGUAGE_LOADER, "export-video-preparation-None"),
           30                     );
           31                     ui.selectable_value(
           32                         &mut options.screen_preparation,
           33                         ScreenPreperation::ClearScreen,
           34                         fl!(crate::LANGUAGE_LOADER, "export-video-preparation-Clear"),
           35                     );
           36                     ui.selectable_value(
           37                         &mut options.screen_preparation,
           38                         ScreenPreperation::Home,
           39                         fl!(crate::LANGUAGE_LOADER, "export-video-preparation-Home"),
           40                     );
           41                 });
           42         });
           43         ui.add(egui::Checkbox::new(
           44             &mut options.save_sauce,
           45             fl!(crate::LANGUAGE_LOADER, "export-save-sauce-label"),
           46         ));
           47     });
           48 }