mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 12:01:10 +00:00
DisplaySizeInfo
This commit is contained in:
parent
d2c0ce4370
commit
cb00cebbb4
1 changed files with 41 additions and 41 deletions
|
@ -2118,8 +2118,7 @@ void XYWnd::XY_DrawGrid(){
|
||||||
if (stepSize > step)
|
if (stepSize > step)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 1; i < stepSize; i <<= 1)
|
for (i = 1; i < stepSize; i <<= 1);
|
||||||
;
|
|
||||||
step = i;
|
step = i;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -2250,8 +2249,9 @@ void XYWnd::XY_DrawGrid(){
|
||||||
// Pixels between left of label and
|
// Pixels between left of label and
|
||||||
// - left of grid view window (for horizontal grid line label) or
|
// - left of grid view window (for horizontal grid line label) or
|
||||||
// - drawn vertical grid line (for vertical grid line label).
|
// - drawn vertical grid line (for vertical grid line label).
|
||||||
const int pixelsLeftCushion = 2; // IMPORTANT! Must be at least 1 otherwise labels might not be drawn
|
// IMPORTANT! Must be at least 1 otherwise labels might not be drawn,
|
||||||
// because the origin of the text might be off screen due to rounding.
|
// because the origin of the text might be off screen due to rounding
|
||||||
|
const int pixelsLeftCushion = 2;
|
||||||
|
|
||||||
// Pixels between baseline of horizontal grid line label and drawn horizontal grid line.
|
// Pixels between baseline of horizontal grid line label and drawn horizontal grid line.
|
||||||
const int pixelsButtomCushion = 2;
|
const int pixelsButtomCushion = 2;
|
||||||
|
@ -2574,7 +2574,7 @@ void XYWnd::DrawZIcon( void ){
|
||||||
// which is not an excuse, just a fact
|
// which is not an excuse, just a fact
|
||||||
void XYWnd::PaintSizeInfo( int nDim1, int nDim2, vec3_t vMinBounds, vec3_t vMaxBounds ){
|
void XYWnd::PaintSizeInfo( int nDim1, int nDim2, vec3_t vMinBounds, vec3_t vMaxBounds ){
|
||||||
const char* g_pDimStrings[] = {"x: %.f", "y: %.f", "z: %.f"};
|
const char* g_pDimStrings[] = {"x: %.f", "y: %.f", "z: %.f"};
|
||||||
const char* g_pOrgStrings[] = {"(x:%.f y:%.f)", "(x:%.f z:%.f)", "(y:%.f z:%.f)"};
|
const char* g_pOrgStrings[] = {"(x: %.f, y: %.f)", "(x: %.f, z: %.f)", "(y: %.f, z: %.f)"};
|
||||||
|
|
||||||
CString g_strDim;
|
CString g_strDim;
|
||||||
|
|
||||||
|
@ -2609,7 +2609,7 @@ void XYWnd::PaintSizeInfo( int nDim1, int nDim2, vec3_t vMinBounds, vec3_t vMaxB
|
||||||
|
|
||||||
qglEnd();
|
qglEnd();
|
||||||
|
|
||||||
qglRasterPos3f( Betwixt( vMinBounds[nDim1], vMaxBounds[nDim1] ), vMinBounds[nDim2] - 20.0 / m_fScale, 0.0f );
|
qglRasterPos3f( Betwixt( vMinBounds[nDim1], vMaxBounds[nDim1] ), vMinBounds[nDim2] - 25.0 / m_fScale, 0.0f );
|
||||||
g_strDim.Format( g_pDimStrings[nDim1], vSize[nDim1] );
|
g_strDim.Format( g_pDimStrings[nDim1], vSize[nDim1] );
|
||||||
gtk_glwidget_print_string( (char *) g_strDim.GetBuffer() );
|
gtk_glwidget_print_string( (char *) g_strDim.GetBuffer() );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue