summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-11-28 20:06:34 +0100
committersapier <Sapier at GMX dot net>2014-11-30 18:06:54 +0100
commit39162de15a2603f1282241aef412ef1b70162b27 (patch)
treeddcd0c42420093eaebdda13ed10101308af345dc /src/guiFormSpecMenu.cpp
parentd1d6a97b1cd05ec34358b6519fc232fc158cf521 (diff)
downloadminetest-39162de15a2603f1282241aef412ef1b70162b27.tar.gz
minetest-39162de15a2603f1282241aef412ef1b70162b27.tar.bz2
minetest-39162de15a2603f1282241aef412ef1b70162b27.zip
Make hud use fontengine too
Fix non coding style conforming glb_fontengine to g_fontengine Fix fonts never been deleted due to grabbed to often
Diffstat (limited to 'src/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index c81238a65..0a7a82399 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -91,11 +91,11 @@ static gui::IGUIFont *select_font_by_line_height(double target_line_height)
unsigned int hireq = ceil(target_line_height
/ porting::getDisplayDensity()
/ g_settings->getFloat("gui_scaling"));
- unsigned int lohgt = font_line_height(glb_fontengine->getFont(loreq));
- unsigned int hihgt = font_line_height(glb_fontengine->getFont(hireq));
+ unsigned int lohgt = font_line_height(g_fontengine->getFont(loreq));
+ unsigned int hihgt = font_line_height(g_fontengine->getFont(hireq));
while(hireq - loreq > 1 && lohgt != hihgt) {
unsigned int nureq = (loreq + hireq) >> 1;
- unsigned int nuhgt = font_line_height(glb_fontengine->getFont(nureq));
+ unsigned int nuhgt = font_line_height(g_fontengine->getFont(nureq));
if(nuhgt < target_line_height) {
loreq = nureq;
lohgt = nuhgt;
@@ -104,7 +104,7 @@ static gui::IGUIFont *select_font_by_line_height(double target_line_height)
hihgt = nuhgt;
}
}
- return glb_fontengine->getFont(target_line_height - lohgt < hihgt - target_line_height ? loreq : hireq);
+ return g_fontengine->getFont(target_line_height - lohgt < hihgt - target_line_height ? loreq : hireq);
}
GUIFormSpecMenu::GUIFormSpecMenu(irr::IrrlichtDevice* dev,
@@ -1992,7 +1992,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
// Non-size[] form must consist only of text fields and
// implicit "Proceed" button. Use default font, and
// temporary form size which will be recalculated below.
- m_font = glb_fontengine->getFont();
+ m_font = g_fontengine->getFont();
m_btn_height = font_line_height(m_font) * 0.875;
DesiredRect = core::rect<s32>(
mydata.screensize.X/2 - 580/2,