X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=radiant%2Fmainframe.cpp;h=a441e03c39a9e9b38baec34522b8f8167aa83ffa;hp=dd3a17b9c8f1fa10b0cea6a9de8fa942459833b1;hb=04a61593c35c583ea966469d10dd92040cd7da64;hpb=29b0e01ae7c5ec8f230ef79ad5beae40e29dd0eb diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index dd3a17b9..a441e03c 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -718,7 +718,7 @@ void PasteToCamera() // Work out the delta Vector3 mid; Select_GetMid(mid); - Vector3 delta = vector3_subtracted(vector3_snapped(Camera_getOrigin(camwnd), GetGridSize()), mid); + Vector3 delta = vector3_subtracted(vector3_snapped(Camera_getOrigin(camwnd), GetSnapGridSize()), mid); // Move to camera GlobalSelectionSystem().translateSelected(delta); @@ -3288,7 +3288,7 @@ void MainFrame::SetGridStatus() { StringOutputStream status(64); const char* lock = (GridStatus_getTextureLockEnabled()) ? "ON" : "OFF"; - status << "G:" << GridStatus_getGridSize() + status << (GetSnapGridSize() > 0 ? "G:" : "g:") << GridStatus_getGridSize() << " R:" << GridStatus_getRotateIncrement() << " C:" << GridStatus_getFarClipDistance() << " L:" << lock; @@ -3305,7 +3305,7 @@ void GridStatus_onTextureLockEnabledChanged() namespace { - GLFont g_font(0, 0); + GLFont g_font(0, 0, 0, 0); } void GlobalGL_sharedContextCreated() @@ -3323,14 +3323,21 @@ void GlobalGL_sharedContextCreated() GlobalShaderCache().realise(); Textures_Realise(); +#ifdef WIN32 + /* win32 is dodgy here, just use courier new then */ + g_font = glfont_create("courier new 8"); +#else /* use default font here (Sans 10 is gtk default) */ GtkSettings *settings = gtk_settings_get_default(); gchar *fontname; g_object_get(settings, "gtk-font-name", &fontname, NULL); g_font = glfont_create(fontname); +#endif GlobalOpenGL().m_font = g_font.getDisplayList(); GlobalOpenGL().m_fontHeight = g_font.getPixelHeight(); + GlobalOpenGL().m_fontAscent = g_font.getPixelAscent(); + GlobalOpenGL().m_fontDescent = g_font.getPixelDescent(); } void GlobalGL_sharedContextDestroyed()