Mercurial > fife-parpg
comparison engine/core/video/fonts/fontbase.cpp @ 244:7887f3854862
'Fixed' segfault in rio de hola. Font system in FIFE is odd.
Also don't call onActionFinished in ~Instance.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 25 Mar 2009 09:38:10 +0000 |
parents | 756b895e1dab |
children | 6dace911ac2d |
comparison
equal
deleted
inserted
replaced
243:a822b1a6e3cd | 244:7887f3854862 |
---|---|
76 | 76 |
77 SDL_Color FontBase::getColor() const { | 77 SDL_Color FontBase::getColor() const { |
78 return mColor; | 78 return mColor; |
79 } | 79 } |
80 | 80 |
81 int FontBase::getStringIndexAt(const std::string &text, int x) { | 81 int FontBase::getStringIndexAt(const std::string &text, int x) const { |
82 assert( utf8::is_valid(text.begin(), text.end()) ); | 82 assert( utf8::is_valid(text.begin(), text.end()) ); |
83 std::string::const_iterator cur; | 83 std::string::const_iterator cur; |
84 if (text.size() == 0) return 0; | 84 if (text.size() == 0) return 0; |
85 if (x <= 0) return 0; | 85 if (x <= 0) return 0; |
86 | 86 |