mirror of
				https://github.com/WarrenHood/MCModpackManager.git
				synced 2025-11-04 08:18:40 +00:00 
			
		
		
		
	Make the mods directory display in an uneditable text box for the edit profile view
This commit is contained in:
		
							parent
							
								
									276e16857c
								
							
						
					
					
						commit
						6cc15eed68
					
				| 
						 | 
					@ -318,6 +318,10 @@ impl ManagerGUI {
 | 
				
			||||||
        previous_view: ManagerView,
 | 
					        previous_view: ManagerView,
 | 
				
			||||||
        can_edit_name: bool,
 | 
					        can_edit_name: bool,
 | 
				
			||||||
    ) -> Element<Message> {
 | 
					    ) -> Element<Message> {
 | 
				
			||||||
 | 
					        let current_mods_directory_display = match &self.profile_edit_settings.mods_dir {
 | 
				
			||||||
 | 
					            Some(mods_dir) => mods_dir.display().to_string(),
 | 
				
			||||||
 | 
					            None => String::from(""),
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
        let mut profile_editor = column![
 | 
					        let mut profile_editor = column![
 | 
				
			||||||
            text("Profile Add/Edit").horizontal_alignment(iced::alignment::Horizontal::Center),
 | 
					            text("Profile Add/Edit").horizontal_alignment(iced::alignment::Horizontal::Center),
 | 
				
			||||||
            row![
 | 
					            row![
 | 
				
			||||||
| 
						 | 
					@ -341,12 +345,9 @@ impl ManagerGUI {
 | 
				
			||||||
            .spacing(5),
 | 
					            .spacing(5),
 | 
				
			||||||
            row![
 | 
					            row![
 | 
				
			||||||
                "Mods directory",
 | 
					                "Mods directory",
 | 
				
			||||||
                text(
 | 
					                text_input(
 | 
				
			||||||
                    if let Some(mods_dir) = &self.profile_edit_settings.mods_dir {
 | 
					                    "Browse for your MC instance's mods directory",
 | 
				
			||||||
                        mods_dir.display().to_string()
 | 
					                    ¤t_mods_directory_display
 | 
				
			||||||
                    } else {
 | 
					 | 
				
			||||||
                        "".into()
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                ),
 | 
					                ),
 | 
				
			||||||
                button("Browse").on_press(Message::BrowseModsDir)
 | 
					                button("Browse").on_press(Message::BrowseModsDir)
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue