forked from 1b-agent/opencadstudio-upstream
Merge pull request #1549 from MarcelP102/codex/graphic-attributes-cleanup
[UX] Introducing graphic attributes panel # Conflicts: # locales/ar-SA/opencadstudio.ftl # locales/bg-BG/opencadstudio.ftl # locales/cs-CZ/opencadstudio.ftl # locales/de-DE/opencadstudio.ftl # locales/el-GR/opencadstudio.ftl # locales/en-US/opencadstudio.ftl # locales/es-ES/opencadstudio.ftl # locales/fi-FI/opencadstudio.ftl # locales/fr-FR/opencadstudio.ftl # locales/hi-IN/opencadstudio.ftl # locales/hu-HU/opencadstudio.ftl # locales/it-IT/opencadstudio.ftl # locales/ja-JP/opencadstudio.ftl # locales/ko-KR/opencadstudio.ftl # locales/lo-LA/opencadstudio.ftl # locales/nl-NL/opencadstudio.ftl # locales/pl-PL/opencadstudio.ftl # locales/pt-BR/opencadstudio.ftl # locales/ru-RU/opencadstudio.ftl # locales/tr-TR/opencadstudio.ftl # locales/zh-CN/opencadstudio.ftl # locales/zh-TW/opencadstudio.ftl # src/app/mod.rs # src/app/update/dialog.rs # src/app/view/mod.rs # src/locale_catalog.rs # src/ui/dock.rs
This commit is contained in:
commit
1333efcad2
68 files changed
+6178
-173
No files matched your search
@@ -354,6 +354,46 @@ impl CadCommand for ValuePromptCommand {
|
||||
}
|
||||
}
|
||||
|
||||
/// One-value prompt that preserves spaces and letter casing. This is intended
|
||||
/// for symbol names entered through the command line, where a space belongs to
|
||||
/// the value instead of submitting the current token.
|
||||
pub struct FreeTextValuePromptCommand {
|
||||
name: &'static str,
|
||||
prompt: &'static str,
|
||||
}
|
||||
|
||||
impl FreeTextValuePromptCommand {
|
||||
pub fn new(name: &'static str, prompt: &'static str) -> Self {
|
||||
Self { name, prompt }
|
||||
}
|
||||
}
|
||||
|
||||
impl CadCommand for FreeTextValuePromptCommand {
|
||||
fn name(&self) -> &'static str {
|
||||
self.name
|
||||
}
|
||||
|
||||
fn prompt(&self) -> String {
|
||||
crate::t!(self.prompt).into_owned()
|
||||
}
|
||||
|
||||
fn input_kind(&self) -> InputKind {
|
||||
InputKind::FreeText
|
||||
}
|
||||
|
||||
fn on_text_input(&mut self, text: &str) -> Option<CmdResult> {
|
||||
Some(CmdResult::Dispatch(format!("{} {}", self.name, text.trim())))
|
||||
}
|
||||
|
||||
fn on_point(&mut self, _pt: DVec3) -> CmdResult {
|
||||
CmdResult::NeedPoint
|
||||
}
|
||||
|
||||
fn on_enter(&mut self) -> CmdResult {
|
||||
CmdResult::Dispatch(format!("{} ", self.name))
|
||||
}
|
||||
}
|
||||
|
||||
/// Interactive pick for `UCS FACE` and `UCS OBJECT`.
|
||||
///
|
||||
/// Hands the picked entity to the inline `UCS FACE <handle> <x,y,z>` /
|
||||
|
||||
Reference in new issue
Block a user