640×480 (VGA) intern, UI auf EGA 8×14
Text-getrieben → 80-Spalten-Textmodus-Look; RGB555+Dither bleiben. Menü-/Dialog-Metriken an die Fonthöhe angepasst, CGA bleibt fürs HUD. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-4
@@ -221,7 +221,9 @@ const TEXT: [f32; 4] = [0.92, 0.92, 1.0, 1.0];
|
||||
pub(crate) fn layout(internal: [f32; 2], fonts: &Fonts, session: &Session, cur: &Cursor) -> Screen {
|
||||
let mut ui = Ui::default();
|
||||
let mut hover: Option<String> = None;
|
||||
let f = &fonts.cga; // CGA 8×8 ist der UI-Standard-Font.
|
||||
// EGA 8×14 ist der UI-Standard-Font: bei 640×480 der klassische
|
||||
// 80-Spalten-VGA-Textmodus. CGA 8×8 bleibt für kleines HUD-Zeug.
|
||||
let f = &fonts.ega;
|
||||
|
||||
// Im Flycam-Modus (Maus gefangen) zählt die freie Sicht → kein Panel.
|
||||
// Sonst je nach Modus Menü oder Dialog. Hit-Tests laufen nur bei freier
|
||||
@@ -257,7 +259,7 @@ fn menu(ui: &mut Ui, f: &Font, internal: [f32; 2], cur: [f32; 2], hover: &mut Op
|
||||
("KV anzeigen", "kv"),
|
||||
("Beenden", "quit"),
|
||||
];
|
||||
let (bw, bh, gap) = (112.0, 14.0, 4.0);
|
||||
let (bw, bh, gap) = (176.0, 20.0, 6.0);
|
||||
let title_h = f.glyph_h;
|
||||
let body_h = title_h + gap + items.len() as f32 * bh + (items.len() as f32 - 1.0) * gap;
|
||||
let pw = bw + 2.0 * INSET;
|
||||
@@ -280,8 +282,8 @@ fn menu(ui: &mut Ui, f: &Font, internal: [f32; 2], cur: [f32; 2], hover: &mut Op
|
||||
/// ein „Weiter"-Button, dessen Aktion die Leereingabe ist (blättert weiter) —
|
||||
/// derselbe Pfad wie Enter im Terminal (`dialog_input`).
|
||||
fn dialog(ui: &mut Ui, f: &Font, internal: [f32; 2], d: &Dialog, cur: [f32; 2], hover: &mut Option<String>) {
|
||||
let margin = 16.0;
|
||||
let (bh, gap) = (14.0, 4.0);
|
||||
let margin = 24.0;
|
||||
let (bh, gap) = (20.0, 6.0);
|
||||
let pw = internal[0] - 2.0 * margin;
|
||||
let line_h = f.glyph_h + 2.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user