#include <text_context_user.h>
Inheritance diagram for NL3D::CTextContextUser:
Nevrax France
Definition at line 46 of file text_context_user.h.
Public Types | |
enum | THotSpot { BottomLeft = 0, MiddleLeft, TopLeft, MiddleBottom, MiddleMiddle, MiddleTop, BottomRight, MiddleRight, TopRight, HotSpotCount } |
Public Member Functions | |
virtual URenderStringBuffer * | createRenderBuffer () |
create a renderBuffer for printClipAt(). Must delete it with deleteRenderBuffer() | |
CTextContextUser (const std::string fontFileName, const std::string fontExFileName, CDriverUser *drv, CFontManager *fmg) | |
Constructor. | |
virtual void | deleteRenderBuffer (URenderStringBuffer *buffer) |
void | dumpCacheTexture (const char *filename) |
Used for debug. | |
virtual void | flushRenderBuffer (URenderStringBuffer *buffer) |
Flush the rendered string buffer. This method sets the driver matrix to a 2d11 matrix and sets ztest to always and disable z write. | |
virtual void | flushRenderBufferUnProjected (URenderStringBuffer *buffer, bool zwrite) |
Flush the rendered string buffer. This method doesn't change the current matrices nor the material properties. | |
CTextContext & | getTextContext () |
virtual | ~CTextContextUser () |
Rendering. | |
void | clear () |
void | erase (uint32 i) |
float | getLastXBound () const |
virtual CStringInfo | getStringInfo (const ucstring &ucstr) |
virtual CStringInfo | getStringInfo (uint32 i) |
void | printAt (float x, float y, const ucstring &ucstr) |
void | printAt (float x, float y, uint32 i) |
void | printClipAt (URenderStringBuffer &renderBuffer, float x, float y, uint32 i, float xmin, float ymin, float xmax, float ymax) |
void | printClipAtOld (float x, float y, uint32 i, float xmin, float ymin, float xmax, float ymax) |
void | printClipAtUnProjected (URenderStringBuffer &renderBuffer, class NL3D::CFrustum &frustum, const NLMISC::CMatrix &scaleMatrix, float x, float y, float depth, uint32 i, float xmin, float ymin, float xmax, float ymax) |
void | printfAt (float x, float y, const char *format,...) |
void | render3D (const CMatrix &mat, const char *format,...) |
void | render3D (const CMatrix &mat, const ucstring &ucstr) |
void | resetStringSelection (uint32 i) |
void | setStringColor (uint32 i, CRGBA newCol) |
void | setStringSelection (uint32 i, uint32 selectStart, uint32 selectSize) |
uint32 | textPush (const ucstring &str) |
uint32 | textPush (const char *format,...) |
Text look. | |
uint32 | getFontSize () const |
THotSpot | getHotSpot () const |
bool | getKeep800x600Ratio () const |
float | getScaleX () const |
float | getScaleY () const |
NLMISC::CRGBA | getShadeColor () const |
bool | getShaded () const |
void | setColor (NLMISC::CRGBA color) |
void | setFontSize (uint32 fontSize) |
void | setHotSpot (THotSpot hotSpot) |
void | setKeep800x600Ratio (bool keep) |
void | setScaleX (float scaleX) |
void | setScaleY (float scaleY) |
void | setShadeColor (NLMISC::CRGBA sc) |
void | setShaded (bool b) |
void | setShadeExtent (float shext) |
Rendering. | |
virtual void | render3D (const NLMISC::CMatrix &mat, const char *format,...)=0 |
virtual void | render3D (const NLMISC::CMatrix &mat, const ucstring &ucstr)=0 |
Private Attributes | |
CComputedString | _CacheString |
IDriver * | _Driver |
CDriverUser * | _DriverUser |
CTextContext | _TextContext |
|
Definition at line 70 of file u_text_context.h.
00071 { 00072 BottomLeft=0, 00073 MiddleLeft, 00074 TopLeft, 00075 MiddleBottom, 00076 MiddleMiddle, 00077 MiddleTop, 00078 BottomRight, 00079 MiddleRight, 00080 TopRight, 00081 00082 HotSpotCount 00083 }; |
|
Constructor.
Definition at line 57 of file text_context_user.h. References _TextContext, NL3D::CTextContext::init(), NL3D_MEM_TEXT_CONTEXT, nlassert, NL3D::CTextContext::setFontGenerator(), and uint.
00058 { 00059 NL3D_MEM_TEXT_CONTEXT 00060 nlassert(drv); 00061 _DriverUser= drv; 00062 00063 // The enum of CComputedString and UTextContext MUST be the same!!! 00064 nlassert((uint)UTextContext::HotSpotCount== (uint)CComputedString::HotSpotCount); 00065 00066 _Driver= drv->getDriver(); 00067 _TextContext.init(_Driver, fmg); 00068 _TextContext.setFontGenerator(fontFileName, fontExFileName); 00069 } |
|
Definition at line 70 of file text_context_user.h. References NL3D_MEM_TEXT_CONTEXT.
00071 { 00072 NL3D_MEM_TEXT_CONTEXT 00073 } |
|
empty the map Implements NL3D::UTextContext. Definition at line 287 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::clear(), and NL3D_HAUTO_RENDER_2D_TEXTCONTEXT.
00288 { 00289 NL_ALLOC_CONTEXT( 3dTCClr ) 00290 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00291 00292 _TextContext.clear(); 00293 } |
|
create a renderBuffer for printClipAt(). Must delete it with deleteRenderBuffer()
Implements NL3D::UTextContext. Definition at line 388 of file text_context_user.cpp.
00389 { 00390 NL_ALLOC_CONTEXT( 3dTCBuf ) 00391 return new CRenderStringBuffer; 00392 } |
|
Implements NL3D::UTextContext. Definition at line 393 of file text_context_user.cpp. References buffer.
00394 { 00395 NL_ALLOC_CONTEXT( 3dTCBuf ) 00396 delete buffer; 00397 } |
|
Used for debug.
Implements NL3D::UTextContext. Definition at line 380 of file text_context_user.cpp. References _TextContext, and NL3D::CTextContext::dumpCache().
00381 { 00382 NL_ALLOC_CONTEXT( 3dTCDup ) 00383 _TextContext.dumpCache (filename); 00384 } |
|
remove a string from the list Implements NL3D::UTextContext. Definition at line 261 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::erase(), NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, and uint32.
00262 { 00263 NL_ALLOC_CONTEXT( 3dTCErs ) 00264 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00265 00266 _TextContext.erase(i); 00267 } |
|
Flush the rendered string buffer. This method sets the driver matrix to a 2d11 matrix and sets ztest to always and disable z write.
Implements NL3D::UTextContext. Definition at line 398 of file text_context_user.cpp. References _TextContext, buffer, NL3D::CRenderStringBuffer::flush(), NL3D::CTextContext::getFontManager(), NL3D::CFontManager::getFontMaterial(), nlassert, NL3D::CRenderStringBuffer::NumQuads, and NL3D::CDriverUser::restoreMatrixContextMatrixOnly(). Referenced by printClipAtOld().
00399 { 00400 NL_ALLOC_CONTEXT( 3dTCBuf ) 00401 nlassert(buffer); 00402 CRenderStringBuffer *rdrBuffer= static_cast<CRenderStringBuffer*>(buffer); 00403 if(rdrBuffer->NumQuads) 00404 { 00405 rdrBuffer->flush(*_Driver, _TextContext.getFontManager()->getFontMaterial()); 00406 00407 // must restore the Matrix context if some display done. Need just for Frustum/Matrixes 00408 _DriverUser->restoreMatrixContextMatrixOnly(); 00409 } 00410 } |
|
Flush the rendered string buffer. This method doesn't change the current matrices nor the material properties.
Implements NL3D::UTextContext. Definition at line 411 of file text_context_user.cpp. References _TextContext, buffer, NL3D::CRenderStringBuffer::flushUnProjected(), NL3D::CTextContext::getFontManager(), NL3D::CFontManager::getFontMaterial(), nlassert, and NL3D::CRenderStringBuffer::NumQuads.
00412 { 00413 NL_ALLOC_CONTEXT( 3dTCBuf ) 00414 nlassert(buffer); 00415 CRenderStringBuffer *rdrBuffer= static_cast<CRenderStringBuffer*>(buffer); 00416 if(rdrBuffer->NumQuads) 00417 { 00418 rdrBuffer->flushUnProjected(*_Driver, _TextContext.getFontManager()->getFontMaterial(), zwrite); 00419 } 00420 } |
|
get the font size
Implements NL3D::UTextContext. Definition at line 115 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getFontSize(), NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and uint32.
00116 { 00117 NL3D_MEM_TEXT_CONTEXT 00118 NL3D_HAUTO_UI_TEXTCONTEXT; 00119 00120 return _TextContext.getFontSize(); 00121 } |
|
get the hot spot
Implements NL3D::UTextContext. Definition at line 129 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getHotSpot(), NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and uint32.
00130 { 00131 NL3D_MEM_TEXT_CONTEXT 00132 NL3D_HAUTO_UI_TEXTCONTEXT; 00133 00134 return (THotSpot)(uint32)_TextContext.getHotSpot(); 00135 } |
|
return keep800x600Ratio state. Implements NL3D::UTextContext. Definition at line 206 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getKeep800x600Ratio(), NL3D_HAUTO_UI_TEXTCONTEXT, and NL3D_MEM_TEXT_CONTEXT.
00207 { 00208 NL3D_MEM_TEXT_CONTEXT 00209 NL3D_HAUTO_UI_TEXTCONTEXT; 00210 00211 return _TextContext.getKeep800x600Ratio(); 00212 } |
|
Return max x coordinate of last string printed. Useful to know if a string goes out of the screen (screen limit is supposed at x==4/3, should actually depend on driver's frustum).
Implements NL3D::UTextContext. Definition at line 371 of file text_context_user.cpp. References NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, and NL3D_MEM_TEXT_CONTEXT.
00372 { 00373 NL3D_MEM_TEXT_CONTEXT 00374 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00375 00376 return 0.0f; 00377 } |
|
Implements NL3D::UTextContext. Definition at line 150 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getScaleX(), NL3D_HAUTO_UI_TEXTCONTEXT, and NL3D_MEM_TEXT_CONTEXT.
00151 { 00152 NL3D_MEM_TEXT_CONTEXT 00153 NL3D_HAUTO_UI_TEXTCONTEXT; 00154 00155 return _TextContext.getScaleX(); 00156 } |
|
Implements NL3D::UTextContext. Definition at line 157 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getScaleZ(), NL3D_HAUTO_UI_TEXTCONTEXT, and NL3D_MEM_TEXT_CONTEXT.
00158 { 00159 NL3D_MEM_TEXT_CONTEXT 00160 NL3D_HAUTO_UI_TEXTCONTEXT; 00161 00162 return _TextContext.getScaleZ(); 00163 } |
|
get the shadow's color the shadow color Implements NL3D::UTextContext. Definition at line 192 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getShadeColor(), NL3D_HAUTO_UI_TEXTCONTEXT, and NL3D_MEM_TEXT_CONTEXT.
00193 { 00194 NL3D_MEM_TEXT_CONTEXT 00195 NL3D_HAUTO_UI_TEXTCONTEXT; 00196 00197 return _TextContext.getShadeColor(); 00198 } |
|
Implements NL3D::UTextContext. Definition at line 171 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getShaded(), NL3D_HAUTO_UI_TEXTCONTEXT, and NL3D_MEM_TEXT_CONTEXT.
00172 { 00173 NL3D_MEM_TEXT_CONTEXT 00174 NL3D_HAUTO_UI_TEXTCONTEXT; 00175 00176 return _TextContext.getShaded(); 00177 } |
|
Get a string information from the ucstring The returned string info is in pixel size per default. Implements NL3D::UTextContext. Definition at line 279 of file text_context_user.cpp. References _CacheString, _TextContext, NL3D::CTextContext::computeStringInfo(), NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CComputedString::StringHeight, NL3D::CComputedString::StringLine, and NL3D::CComputedString::StringWidth.
00280 { 00281 NL_ALLOC_CONTEXT( 3dTCIfo ) 00282 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00283 00284 _TextContext.computeStringInfo(str, _CacheString); 00285 return CStringInfo (_CacheString.StringWidth, _CacheString.StringHeight, _CacheString.StringLine); 00286 } |
|
Get a string information from the list. return CStringInfo(0,0) if not found. The returned string info is in pixel size per default. Implements NL3D::UTextContext. Definition at line 268 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getComputedString(), NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CComputedString::StringHeight, NL3D::CComputedString::StringLine, NL3D::CComputedString::StringWidth, and uint32.
00269 { 00270 NL_ALLOC_CONTEXT( 3dTCIfo ) 00271 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00272 00273 CComputedString *cstr= _TextContext.getComputedString(i); 00274 if(!cstr) 00275 return CStringInfo(0, 0, 0); 00276 else 00277 return CStringInfo(cstr->StringWidth, cstr->StringHeight, cstr->StringLine); 00278 } |
|
Definition at line 133 of file text_context_user.h. References _TextContext.
00133 {return _TextContext;} |
|
compute and print a ucstring at the location (2D method) x/y E [0,1] Implements NL3D::UTextContext. Definition at line 325 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CTextContext::printAt(), NL3D::CDriverUser::restoreMatrixContext(), x, and y.
00326 { 00327 NL_ALLOC_CONTEXT( 3dTCPt3 ) 00328 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00329 00330 _TextContext.printAt(x, y, ucstr); 00331 _DriverUser->restoreMatrixContext(); 00332 } |
|
print a string of the list (2D method). x/y E [0,1] (rq : it leaves the string in the stack) z : if the hotspot is bottom z is the position of the line of the string, not the bottom of the string bounding box ! Implements NL3D::UTextContext. Definition at line 294 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CTextContext::printAt(), NL3D::CDriverUser::restoreMatrixContext(), uint32, x, and y.
00295 { 00296 NL_ALLOC_CONTEXT( 3dTCPt0 ) 00297 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00298 00299 _TextContext.printAt(x, y, i); 00300 _DriverUser->restoreMatrixContext(); 00301 } |
|
Same as printAt but special version for interface: clip and insert in a temp buffer. z : if the hotspot is bottom z is the position of the line of the string, not the bottom of the string bounding box ! Implements NL3D::UTextContext. Definition at line 302 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CTextContext::printClipAt(), uint32, x, and y. Referenced by printClipAtOld().
00303 { 00304 NL_ALLOC_CONTEXT( 3dTCPt1 ) 00305 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00306 00307 _TextContext.printClipAt(static_cast<CRenderStringBuffer&>(renderBuffer), x, y, i, xmin, ymin, xmax, ymax); 00308 // Don't need to restore Matrix context here since no driver change 00309 } |
|
empty the map Implements NL3D::UTextContext. Definition at line 318 of file text_context_user.cpp. References flushRenderBuffer(), printClipAt(), uint32, x, and y.
00319 { 00320 NL_ALLOC_CONTEXT( 3dTCPt2 ) 00321 static CRenderStringBuffer rdrBuffer; 00322 printClipAt(rdrBuffer, x, y ,i, xmin, ymin, xmax, ymax); 00323 flushRenderBuffer(&rdrBuffer); 00324 } |
|
Same as printClipAt but special version for planar 3d interface: the final vertices are unproject using a frustum. depth is the positive depth to used to unproject the string worldSpaceMatrix is used to mul each vertex (when in 0..1 coordinate for x/y and in meter for z coordinate) Implements NL3D::UTextContext. Definition at line 310 of file text_context_user.cpp. References _TextContext, depth, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CTextContext::printClipAtUnProjected(), uint32, x, and y.
00311 { 00312 NL_ALLOC_CONTEXT( 3dTCPt1 ) 00313 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00314 00315 _TextContext.printClipAtUnProjected(static_cast<CRenderStringBuffer&>(renderBuffer), frustum, scaleMatrix, x, y, depth, i, xmin, ymin, xmax, ymax); 00316 // Don't need to restore Matrix context here since no driver change 00317 } |
|
compute and print a string at the location (2D method) x/y E [0,1] Implements NL3D::UTextContext. Definition at line 333 of file text_context_user.cpp. References _TextContext, format, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NLMISC_CONVERT_VARGS, NL3D::CTextContext::printAt(), NL3D::CDriverUser::restoreMatrixContext(), x, and y.
00334 { 00335 NL_ALLOC_CONTEXT( 3dTCPt4 ) 00336 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00337 00338 char *str; 00339 NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); 00340 00341 _TextContext.printAt(x, y, ucstring(str)) ; 00342 _DriverUser->restoreMatrixContext(); 00343 } |
|
compute and render a string at the location (3D method) render3D() use UDriver Matrix context for Frustum/ViewMatrix, but use its own modelmatrix (mat). |
|
compute and render a ucstring at the location (3D method) render3D() use UDriver Matrix context for Frustum/ViewMatrix, but use its own modelmatrix (mat). |
|
Definition at line 357 of file text_context_user.cpp. References format, NL3D_HAUTO_RENDER_3D_TEXTCONTEXT, NLMISC_CONVERT_VARGS, render3D(), and NL3D::CDriverUser::restoreMatrixContext().
00358 { 00359 NL_ALLOC_CONTEXT( 3dTCRd1 ) 00360 NL3D_HAUTO_RENDER_3D_TEXTCONTEXT; 00361 00362 char *str; 00363 NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); 00364 00365 render3D(mat, ucstring(str)); 00366 00367 _DriverUser->restoreMatrixContext(); 00368 } |
|
Definition at line 345 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::computeString(), NL3D_HAUTO_RENDER_3D_TEXTCONTEXT, NL3D::CComputedString::render3D(), and NL3D::CDriverUser::restoreMatrixContext(). Referenced by render3D().
00346 { 00347 NL_ALLOC_CONTEXT( 3dTCRd0 ) 00348 NL3D_HAUTO_RENDER_3D_TEXTCONTEXT; 00349 00350 CComputedString computedStr; 00351 _TextContext.computeString(ucstr,computedStr); 00352 00353 computedStr.render3D(*_Driver,mat); 00354 00355 _DriverUser->restoreMatrixContext(); 00356 } |
|
reset the letter selection of a string to 0/0xFFFFFFFF (all displayed) Implements NL3D::UTextContext. Definition at line 251 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getComputedString(), NL3D_MEM_TEXT_CONTEXT, and uint32.
00252 { 00253 NL3D_MEM_TEXT_CONTEXT 00254 CComputedString *str= _TextContext.getComputedString(i); 00255 if(str) 00256 { 00257 str->SelectStart= 0; 00258 str->SelectSize= ~0; 00259 } 00260 } |
|
set the font color
Implements NL3D::UTextContext. Definition at line 101 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setColor().
00102 { 00103 NL3D_MEM_TEXT_CONTEXT 00104 NL3D_HAUTO_UI_TEXTCONTEXT; 00105 00106 _TextContext.setColor(color); 00107 } |
|
set the font size. Should be called before the first print
Implements NL3D::UTextContext. Definition at line 108 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, NL3D::CTextContext::setFontSize(), and uint32.
00109 { 00110 NL3D_MEM_TEXT_CONTEXT 00111 NL3D_HAUTO_UI_TEXTCONTEXT; 00112 00113 _TextContext.setFontSize(fontSize); 00114 } |
|
set the hot spot
Implements NL3D::UTextContext. Definition at line 122 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, NL3D::CTextContext::setHotSpot(), and uint32.
00123 { 00124 NL3D_MEM_TEXT_CONTEXT 00125 NL3D_HAUTO_UI_TEXTCONTEXT; 00126 00127 _TextContext.setHotSpot((CComputedString::THotSpot)(uint32)hotSpot) ; 00128 } |
|
set to true if you want that the font manager look at Driver window size, and resize fontSize so it keeps same size than if it was in 800x600... Implements NL3D::UTextContext. Definition at line 199 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setKeep800x600Ratio().
00200 { 00201 NL3D_MEM_TEXT_CONTEXT 00202 NL3D_HAUTO_UI_TEXTCONTEXT; 00203 00204 _TextContext.setKeep800x600Ratio(keep); 00205 } |
|
set the X scale
Implements NL3D::UTextContext. Definition at line 136 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setScaleX().
00137 { 00138 NL3D_MEM_TEXT_CONTEXT 00139 NL3D_HAUTO_UI_TEXTCONTEXT; 00140 00141 _TextContext.setScaleX(scaleX); 00142 } |
|
set the Y scale
Implements NL3D::UTextContext. Definition at line 143 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setScaleZ().
00144 { 00145 NL3D_MEM_TEXT_CONTEXT 00146 NL3D_HAUTO_UI_TEXTCONTEXT; 00147 00148 _TextContext.setScaleZ(scaleY); 00149 } |
|
set the shadow's color
Implements NL3D::UTextContext. Definition at line 185 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setShadeColor().
00186 { 00187 NL3D_MEM_TEXT_CONTEXT 00188 NL3D_HAUTO_UI_TEXTCONTEXT; 00189 00190 _TextContext.setShadeColor (sc); 00191 } |
|
set the shade states
Implements NL3D::UTextContext. Definition at line 164 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setShaded().
00165 { 00166 NL3D_MEM_TEXT_CONTEXT 00167 NL3D_HAUTO_UI_TEXTCONTEXT; 00168 00169 _TextContext.setShaded(b); 00170 } |
|
set the shadow's size
Implements NL3D::UTextContext. Definition at line 178 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_UI_TEXTCONTEXT, NL3D_MEM_TEXT_CONTEXT, and NL3D::CTextContext::setShadeExtent().
00179 { 00180 NL3D_MEM_TEXT_CONTEXT 00181 NL3D_HAUTO_UI_TEXTCONTEXT; 00182 00183 _TextContext.setShadeExtent(shext); 00184 } |
|
set the color of a string. Implements NL3D::UTextContext. Definition at line 233 of file text_context_user.cpp. References _TextContext, NL3D::CComputedString::Color, NL3D::CTextContext::getComputedString(), and uint32.
00234 { 00235 CComputedString *str= _TextContext.getComputedString(i); 00236 if(str) 00237 { 00238 str->Color= newCol; 00239 } 00240 } |
|
set the letter selection of a string. Only letters in the range given are displayed. Default is 0/0xFFFFFFFF Implements NL3D::UTextContext. Definition at line 241 of file text_context_user.cpp. References _TextContext, NL3D::CTextContext::getComputedString(), NL3D_MEM_TEXT_CONTEXT, and uint32.
00242 { 00243 NL3D_MEM_TEXT_CONTEXT 00244 CComputedString *str= _TextContext.getComputedString(i); 00245 if(str) 00246 { 00247 str->SelectStart= selectStart; 00248 str->SelectSize= selectSize; 00249 } 00250 } |
|
computes an ucstring and adds the result to the stack
Implements NL3D::UTextContext. Definition at line 226 of file text_context_user.cpp. References _TextContext, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NL3D::CTextContext::textPush(), and uint32.
00227 { 00228 NL_ALLOC_CONTEXT( 3dTCPh1 ) 00229 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00230 00231 return _TextContext.textPush(str) ; 00232 } |
|
All rendering are done in current UDriver matrix context. So verify your 2D/3D modes. Implements NL3D::UTextContext. Definition at line 216 of file text_context_user.cpp. References _TextContext, format, NL3D_HAUTO_RENDER_2D_TEXTCONTEXT, NLMISC_CONVERT_VARGS, NL3D::CTextContext::textPush(), and uint32.
00217 { 00218 NL_ALLOC_CONTEXT( 3dTCPh0 ) 00219 NL3D_HAUTO_RENDER_2D_TEXTCONTEXT; 00220 00221 char *str; 00222 NLMISC_CONVERT_VARGS (str, format, NLMISC::MaxCStringSize); 00223 00224 return _TextContext.textPush(ucstring(str)) ; 00225 } |
|
Definition at line 52 of file text_context_user.h. Referenced by getStringInfo(). |
|
Definition at line 51 of file text_context_user.h. |
|
Definition at line 50 of file text_context_user.h. |
|