summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/System.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/win/System.cpp b/win/System.cpp
index c581e83..6406017 100644
--- a/win/System.cpp
+++ b/win/System.cpp
@@ -667,15 +667,31 @@ void SystemUpdateTime(bool bAnimation, int nTime, int nTotal)
void SystemUpdateSnap(unsigned short MoveSnap, unsigned short RotateSnap)
{
- // Status bar
- char snap[256];
+ char Text[256], Buffer[256];
+
+ int SnapXY = MoveSnap & 0xff;
+ int SnapZ = (MoveSnap >> 8) & 0xff;
+
+ strcpy(Text, " M: ");
+
+ if (SnapXY)
+ sprintf(Buffer, "%d", SnapXY);
+ else
+ strcpy(Buffer, "/2");
+
+ strcat(Text, Buffer);
- if (MoveSnap)
- wsprintf(snap, " M: %d R: %d ", MoveSnap, RotateSnap);
+ if (SnapZ)
+ sprintf(Buffer, " %d", SnapZ);
else
- wsprintf(snap, " M: /2 R: %d ", RotateSnap);
+ strcpy(Buffer, " /3");
+
+ strcat(Text, Buffer);
+
+ sprintf(Buffer, " R: %d ", RotateSnap);
+ strcat(Text, Buffer);
- ((CMainFrame*)AfxGetMainWnd())->SetStatusBarPane(ID_INDICATOR_SNAP, snap);
+ ((CMainFrame*)AfxGetMainWnd())->SetStatusBarPane(ID_INDICATOR_SNAP, Text);
}
void SystemUpdatePaste(bool enable)