#include "supertux/info_box_line.hpp"
#include "supertux/textscroller.hpp"
#include "supertux/resources.hpp"
#include "video/drawing_context.hpp"
#include "video/font.hpp"
#include "video/surface.hpp"
Go to the source code of this file.
Functions | |
FontPtr | get_font_by_format_char (char format_char) |
Color | get_color_by_format_char (char format_char) |
InfoBoxLine::LineType | get_linetype_by_format_char (char format_char) |
Variables | |
static const float | ITEMS_SPACE = 4 |
Color @391::get_color_by_format_char | ( | char | format_char | ) | [static] |
Definition at line 51 of file info_box_line.cpp.
References TextScroller::heading_color, log_warning, TextScroller::normal_color, TextScroller::reference_color, and TextScroller::small_color.
Referenced by InfoBoxLine::InfoBoxLine().
00051 { 00052 switch(format_char) 00053 { 00054 case ' ': 00055 return TextScroller::small_color; 00056 break; 00057 case '-': 00058 return TextScroller::heading_color; 00059 break; 00060 case '*': 00061 return TextScroller::reference_color; 00062 case '\t': 00063 case '#': 00064 case '!': 00065 return TextScroller::normal_color; 00066 break; 00067 default: 00068 return Color(0,0,0); 00069 log_warning << "Unknown format_char: '" << format_char << "'" << std::endl; 00070 break; 00071 } 00072 }
FontPtr @391::get_font_by_format_char | ( | char | format_char | ) | [static] |
Definition at line 29 of file info_box_line.cpp.
References Resources::big_font, log_warning, Resources::normal_font, and Resources::small_font.
Referenced by InfoBoxLine::InfoBoxLine(), and InfoBoxLine::split().
00029 { 00030 switch(format_char) 00031 { 00032 case ' ': 00033 return Resources::small_font; 00034 break; 00035 case '-': 00036 return Resources::big_font; 00037 break; 00038 case '\t': 00039 case '*': 00040 case '#': 00041 case '!': 00042 return Resources::normal_font; 00043 break; 00044 default: 00045 return Resources::normal_font; 00046 log_warning << "Unknown format_char: '" << format_char << "'" << std::endl; 00047 break; 00048 } 00049 }
InfoBoxLine::LineType @391::get_linetype_by_format_char | ( | char | format_char | ) | [static] |
Definition at line 74 of file info_box_line.cpp.
References InfoBoxLine::HEADING, InfoBoxLine::IMAGE, log_warning, InfoBoxLine::NORMAL, InfoBoxLine::NORMAL_LEFT, InfoBoxLine::REFERENCE, and InfoBoxLine::SMALL.
Referenced by InfoBoxLine::InfoBoxLine().
00074 { 00075 switch(format_char) 00076 { 00077 case ' ': 00078 return InfoBoxLine::SMALL; 00079 break; 00080 case '\t': 00081 return InfoBoxLine::NORMAL; 00082 break; 00083 case '-': 00084 return InfoBoxLine::HEADING; 00085 break; 00086 case '*': 00087 return InfoBoxLine::REFERENCE; 00088 break; 00089 case '#': 00090 return InfoBoxLine::NORMAL_LEFT; 00091 break; 00092 case '!': 00093 return InfoBoxLine::IMAGE; 00094 break; 00095 default: 00096 return InfoBoxLine::SMALL; 00097 log_warning << "Unknown format_char: '" << format_char << "'" << std::endl; 00098 break; 00099 } 00100 }
const float ITEMS_SPACE = 4 [static] |