From 6e5b503ac6bb11be62ec5df20396811c2787fb32 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Wed, 30 Sep 2009 02:02:15 -0800 Subject: [PATCH] Make everything line up in the configuration screen. [git-p4: depot-paths = "//depot/solvespace/": change = 2043] --- confscreen.cpp | 8 ++++---- textwin.cpp | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/confscreen.cpp b/confscreen.cpp index 5fb4303..759db56 100644 --- a/confscreen.cpp +++ b/confscreen.cpp @@ -149,18 +149,18 @@ void TextWindow::ShowConfiguration(void) { Printf(false, ""); Printf(false, "%Ft chord tolerance (in screen pixels)%E"); - Printf(false, "%Ba %2 %Fl%Ll%f%D[change]%E; now %d triangles", + Printf(false, "%Ba %@ %Fl%Ll%f%D[change]%E; now %d triangles", SS.chordTol, &ScreenChangeChordTolerance, 0, SK.GetGroup(SS.GW.activeGroup)->displayMesh.l.n); Printf(false, "%Ft max piecewise linear segments%E"); - Printf(false, "%Ba %d %Fl%Ll%f[change]%E", + Printf(false, "%Ba %d %Fl%Ll%f[change]%E", SS.maxSegments, &ScreenChangeMaxSegments); Printf(false, ""); Printf(false, "%Ft perspective factor (0 for parallel)%E"); - Printf(false, "%Ba %3 %Fl%Ll%f%D[change]%E", + Printf(false, "%Ba %# %Fl%Ll%f%D[change]%E", SS.cameraTangent*1000, &ScreenChangeCameraTangent, 0); Printf(false, "%Ft snap grid spacing%E"); @@ -170,7 +170,7 @@ void TextWindow::ShowConfiguration(void) { Printf(false, ""); Printf(false, "%Ft export scale factor (1.0=mm, 25.4=inch)"); - Printf(false, "%Ba %3 %Fl%Ll%f%D[change]%E", + Printf(false, "%Ba %# %Fl%Ll%f%D[change]%E", (double)SS.exportScale, &ScreenChangeExportScale, 0); Printf(false, "%Ft cutter radius offset (0=no offset) "); diff --git a/textwin.cpp b/textwin.cpp index c7209fd..1bc630e 100644 --- a/textwin.cpp +++ b/textwin.cpp @@ -102,6 +102,11 @@ void TextWindow::Printf(bool halfLine, char *fmt, ...) { sprintf(buf, "%s%.3f", v < 0 ? "" : " ", v); break; } + case '#': { + double v = va_arg(vl, double); + sprintf(buf, "%.3f", v); + break; + } case 's': { char *s = va_arg(vl, char *); memcpy(buf, s, min(sizeof(buf), strlen(s)+1));