Launcher : pack HD grisé sans Python, avec une phrase qui l'explique
« Créer le pack » et « Exporter les images d'origine » passent encore par tools\hd_export.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b1a299e0b2
commit
c52651256b
1 file changed
+20
@@ -603,6 +603,18 @@ fn dot(ui: &mut egui::Ui, ok: bool) {
|
||||
ui.painter().circle_filled(rect.center(), 5.5, if ok { OK } else { BAD });
|
||||
}
|
||||
|
||||
/// pourquoi les boutons du pack HD sont grisés : ils passent encore par Python (tools\hd_export.py)
|
||||
fn python_note(ui: &mut egui::Ui, lang: Lang) {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.label(RichText::new(i18n::tr(
|
||||
lang,
|
||||
"Créer ou exporter des images demande encore Python 3, absent de ce PC. Le jeu et les packs déjà faits n'en ont pas besoin.",
|
||||
"Creating or exporting pictures still needs Python 3, which is not on this PC. The game and ready-made packs don't need it.",
|
||||
)).color(ACCENT).small());
|
||||
ui.hyperlink_to("python.org", "https://www.python.org/downloads/");
|
||||
});
|
||||
}
|
||||
|
||||
fn status(ui: &mut egui::Ui, ok: bool, label: &str, detail: &str) {
|
||||
dot(ui, ok);
|
||||
ui.label(label);
|
||||
@@ -1418,6 +1430,8 @@ impl App {
|
||||
let running = self.game_running;
|
||||
let busy = self.busy != Busy::No;
|
||||
let can_create = !busy && self.checks.game_dir.is_some() && self.checks.python.is_some();
|
||||
// le pack HD passe encore par tools\hd_export.py : sans Python, ses boutons sont grisés
|
||||
let no_python = self.checks.done && self.checks.python.is_none();
|
||||
let mut open_dir = false;
|
||||
let mut refresh = false;
|
||||
let mut create = false;
|
||||
@@ -1605,6 +1619,9 @@ impl App {
|
||||
stop = true;
|
||||
}
|
||||
});
|
||||
if no_python {
|
||||
python_note(ui, lang);
|
||||
}
|
||||
if matches!(self.busy, Busy::Task("hd")) {
|
||||
let w = ui.available_width();
|
||||
self.progress_bar(ui, w);
|
||||
@@ -1654,6 +1671,9 @@ impl App {
|
||||
stop = true;
|
||||
}
|
||||
});
|
||||
if no_python {
|
||||
python_note(ui, lang);
|
||||
}
|
||||
ui.label(RichText::new(format!(
|
||||
"{} mods\\{}",
|
||||
tr(
|
||||
|
||||
Reference in new issue
Block a user