197
196
// **************************************************
199
static REAL sr_bigFontThresholdWidth = 0;
200
static REAL sr_bigFontThresholdHeight = 0;
198
static REAL sr_bigFontThresholdWidth = 12;
199
static REAL sr_bigFontThresholdHeight = 24;
202
static tConfItem< REAL > sr_bigFontThresholdWidthConf( "FONT_BIG_THRESHOLD_WIDTH", sr_bigFontThresholdWidth );
203
static tConfItem< REAL > sr_bigFontThresholdHeightConf( "FONT_BIG_THRESHOLD_HEIGHT", sr_bigFontThresholdHeight );
201
static tSettingItem< REAL > sr_bigFontThresholdWidthConf( "FONT_BIG_THRESHOLD_WIDTH", sr_bigFontThresholdWidth );
202
static tSettingItem< REAL > sr_bigFontThresholdHeightConf( "FONT_BIG_THRESHOLD_HEIGHT", sr_bigFontThresholdHeight );
205
204
static REAL sr_smallFontThresholdWidth = 5;
206
205
static REAL sr_smallFontThresholdHeight = 8;
208
static tConfItem< REAL > sr_smallFontThresholdWidthConf( "FONT_SMALL_THRESHOLD_WIDTH", sr_smallFontThresholdWidth );
209
static tConfItem< REAL > sr_smallFontThresholdHeightConf( "FONT_SMALL_THRESHOLD_HEIGHT", sr_smallFontThresholdHeight );
207
static tSettingItem< REAL > sr_smallFontThresholdWidthConf( "FONT_SMALL_THRESHOLD_WIDTH", sr_smallFontThresholdWidth );
208
static tSettingItem< REAL > sr_smallFontThresholdHeightConf( "FONT_SMALL_THRESHOLD_HEIGHT", sr_smallFontThresholdHeight );
211
210
rTextField::rTextField(REAL Left,REAL Top,
212
211
REAL Cwidth,REAL Cheight,
271
static bool sr_renderBrightBackground = false;
272
static tConfItem<bool> rbb("TEXT_BRIGHT_BACKGROUND",sr_renderBrightBackground);
274
static bool sr_renderBrighenText = true;
275
static tConfItem<bool> rbt("TEXT_BRIGHTEN",sr_renderBrighenText);
277
270
void rTextField::FlushLine(int len,bool newline){
278
271
#ifndef DEDICATED
279
272
// reload textures if alpha blending changed
332
324
glEnable(GL_TEXTURE_2D);
335
//Text too dark lets brighten it
336
if ( color_.IsDark() && sr_renderBrighenText)
338
se_MakeColorValid(r,g,b,1.0f);