diff --git a/src/app/commands/blocks.rs b/src/app/commands/blocks.rs index 2cfed47ed..f7e871ac9 100644 --- a/src/app/commands/blocks.rs +++ b/src/app/commands/blocks.rs @@ -324,7 +324,13 @@ impl OpenCADStudio { // block's current attribute definitions: drop attributes whose tag // no longer exists and add any newly-defined ones (keeping the values // of attributes that remain). - cmd if cmd == "ATTSYNC" || cmd.starts_with("ATTSYNC ") => { + "ATTSYNC" => { + use crate::command::ValuePromptCommand; + let c = ValuePromptCommand::new("ATTSYNC", "ATTSYNC block name to sync:"); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("ATTSYNC ") => { let arg = cmd.trim_start_matches("ATTSYNC").trim(); let blocks = self.tabs[i].scene.custom_block_names(); if arg.is_empty() { diff --git a/src/app/commands/display.rs b/src/app/commands/display.rs index a3d436799..2a52d0ad8 100644 --- a/src/app/commands/display.rs +++ b/src/app/commands/display.rs @@ -72,7 +72,22 @@ impl OpenCADStudio { // UCSICON OFF — hide UCS icon in all viewports // UCSICON NOORIGIN — show icon but not at origin (show at corner) // UCSICON ORIGIN — show icon at UCS origin - cmd if cmd == "UCSICON" || cmd.starts_with("UCSICON ") => { + "UCSICON" => { + use crate::command::KeywordCommand; + let c = KeywordCommand::new( + "UCSICON", + "UCSICON [On / Off / NoOrigin / Origin]:", + vec![ + ("On", "ON", None), + ("Off", "OFF", None), + ("NoOrigin", "NOORIGIN", None), + ("Origin", "ORIGIN", None), + ], + ); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("UCSICON ") => { let sub = cmd.split_whitespace().nth(1).unwrap_or("").to_uppercase(); match sub.as_str() { "ON" | "OFF" | "NOORIGIN" | "ORIGIN" => { @@ -746,7 +761,20 @@ impl OpenCADStudio { // SCALELISTEDIT list // SCALELISTEDIT ADD 1:50 add (name is a paper:drawing ratio) // SCALELISTEDIT DELETE 1:50 remove (not the current scale) - cmd if cmd == "SCALELISTEDIT" || cmd.starts_with("SCALELISTEDIT ") => { + "SCALELISTEDIT" => { + use crate::command::KeywordCommand; + let c = KeywordCommand::new( + "SCALELISTEDIT", + "SCALELISTEDIT [Add / Delete]:", + vec![ + ("Add", "ADD", Some("SCALELISTEDIT ADD new scale ratio (e.g. 1:50):")), + ("Delete", "DELETE", Some("SCALELISTEDIT DELETE scale ratio to remove:")), + ], + ); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("SCALELISTEDIT ") => { let rest = cmd.trim_start_matches("SCALELISTEDIT").trim(); let mut parts = rest.splitn(2, char::is_whitespace); let sub = parts.next().unwrap_or("").to_uppercase(); diff --git a/src/app/commands/fileops.rs b/src/app/commands/fileops.rs index 615795df7..959ad48b0 100644 --- a/src/app/commands/fileops.rs +++ b/src/app/commands/fileops.rs @@ -98,10 +98,26 @@ impl OpenCADStudio { // chosen style is reported so the mapping is explicit. (`SOLID` is // intentionally NOT a visual-style verb — it is the 2D filled-polygon // draw command; the shaded ribbon button drives `SetWireframe`.) - cmd if cmd == "VS" - || cmd == "VSCURRENT" - || cmd == "SHADEMODE" - || cmd == "HIDDENLINE" + "VS" | "VSCURRENT" | "SHADEMODE" => { + use crate::command::KeywordCommand; + let c = KeywordCommand::new( + "VSCURRENT", + "VSCURRENT visual style [Shaded / Wireframe / Hidden / Realistic / Conceptual / X-ray]:", + vec![ + ("Shaded", "SHADED", None), + ("Wireframe", "WIREFRAME", None), + ("Hidden", "HIDDEN", None), + ("Realistic", "REALISTIC", None), + ("Conceptual", "CONCEPTUAL", None), + ("X-Ray", "XRAY", None), + ], + ); + self.command_line.push_info(&c.prompt()); + self.tabs[i].active_cmd = Some(Box::new(c)); + } + // The named visual-style shortcuts still switch directly, and the + // `