• R/O
  • SSH
  • HTTPS

daikon: 提交


Commit MetaInfo

修訂37 (tree)
時間2009-02-27 13:54:36
作者karasimiso

Log Message

<フォント>のデフォルト値修正

Change Summary

差異

--- trunk/daikon/src/Library.cpp (revision 36)
+++ trunk/daikon/src/Library.cpp (revision 37)
@@ -305,7 +305,12 @@
305305
306306 SDL_Surface* Library::createString(const char* text, const char* fontPath, int size, const SDL_Color& color, int style)
307307 {
308- TTF_Font* font = TTF_OpenFont(fontPath, size);
308+ if ( *fontPath == 0 ) {
309+ return TTF_RenderUTF8_Blended(getSystemFont(), text, color);
310+ }
311+
312+ TTF_Font* font;
313+ font = TTF_OpenFont(fontPath, size);
309314 if ( !font ) {
310315 cerr << "Library::createString(text,fontpath,size,color,style);" << endl;
311316 cerr << "フォントを開けませんでした。" << endl;
@@ -360,7 +365,7 @@
360365 return keyboardMap[name];
361366 }
362367
363-const TTF_Font* Library::getSystemFont()
368+TTF_Font* Library::getSystemFont()
364369 {
365370 return systemFont;
366371 }
--- trunk/daikon/src/Monitor.cpp (revision 36)
+++ trunk/daikon/src/Monitor.cpp (revision 37)
@@ -250,4 +250,5 @@
250250 bool Monitor::keyReleased(SceneMediator* mediator)
251251 {
252252 keypress = false;
253+ return true;
253254 }
--- trunk/daikon/src/Library.h (revision 36)
+++ trunk/daikon/src/Library.h (revision 37)
@@ -51,7 +51,7 @@
5151 static SDL_Surface* createString(const char* text, const SDL_Color* color);
5252 static SDL_Surface* createFilledString(const char* text, const SDL_Color& fg, const SDL_Color& bg);
5353 static SDL_Surface* createString(const char* text, const char* fontPath, int size, const SDL_Color& color, int style);
54- static const TTF_Font* getSystemFont();
54+ static TTF_Font* getSystemFont();
5555 static SDL_Surface* loadImage(const string& file);
5656 static void freeImages();
5757 static SDLKey getKeySym(string name);
--- trunk/daikon/src/XMLParser/KeyEntryElement.cpp (revision 36)
+++ trunk/daikon/src/XMLParser/KeyEntryElement.cpp (revision 37)
@@ -69,6 +69,7 @@
6969 else {
7070 invalidElement(name);
7171 }
72+ return NULL;
7273 }
7374
7475 void KeyEntryElement::endElement()
--- trunk/daikon/src/XMLParser/ActionFOElement.cpp (revision 36)
+++ trunk/daikon/src/XMLParser/ActionFOElement.cpp (revision 37)
@@ -202,6 +202,7 @@
202202 else {
203203 invalidElement(name);
204204 }
205+ return NULL;
205206 }
206207
207208 void ActionFOElement::endElement()
Show on old repository browser