- added ability to switch languages from nearly anywhere (and new hotkeys to do so):

CTRL+L shows language popup selection, CTRL+SHIFT+L toggles to next language automatically
This commit is contained in:
Mark Vejvoda
2011-10-25 18:39:11 +00:00
parent aebe2aba24
commit 50adfb3305
53 changed files with 1650 additions and 341 deletions

View File

@@ -13,6 +13,7 @@
#include "graphics_interface.h"
#include "graphics_factory.h"
#include <stdexcept>
#include "leak_dumper.h"
namespace Shared { namespace Graphics {
@@ -40,6 +41,26 @@ Font3D *FontManager::newFont3D() {
return font;
}
void FontManager::endFont(Font *font,bool mustExistInList) {
if(font != NULL) {
bool found = false;
for(unsigned int i=0; i < fonts.size(); ++i) {
if(fonts[i] != NULL && font == fonts[i]) {
found = true;
fonts.erase(fonts.begin() + i);
break;
}
}
if(found == false && mustExistInList == true) {
throw std::runtime_error("found == false in endFont");
}
if(found == true) {
font->end();
delete font;
}
}
}
void FontManager::init() {
for(size_t i=0; i<fonts.size(); ++i) {
if(fonts[i] != NULL) {