Masterxilo Posted May 30, 2010 Posted May 30, 2010 N/A Quote Hurricane-Eye Entertainment - Site, blog.
Flexman Posted May 30, 2010 Posted May 30, 2010 :+1 Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo
ZioRed Posted May 31, 2010 Posted May 31, 2010 +10k ;P GetCurrentFont() would be very useful in GUI development (that is my current pain task) for which I chose to continue/improve the PGUI3 library that uses only LE commands. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com
L B Posted July 3, 2010 Posted July 3, 2010 +1, for this and ALL possible Get accessors Josh could think of. We seriously are lacking many. For instance, get if a framework effect is enabled. I know I can store it myself in an additional variable, but it's just slopping coding IMHO. Quote
AndyGFX Posted July 3, 2010 Posted July 3, 2010 Here is simple example howto write FontManager for LE in BMX. Class: Type TFontManager Field fonts:TMap Field CurrentFont:TGLFont Method New() Self.fonts = New TMap Local def:TGLFont = LoadFont("incbin::Arial9") Self.fonts.Insert("Arial9", def) End Method Method AddFont(fname:String) Local fnt:TGLFont = LoadFont("abstract::" + fname) Self.fonts.Insert(fname, fnt) ? Debug Print("FONT: " + fname + " loaded.") ? End Method Method RemoveFont(fname:String) Self.Fonts.Remove(fname) End Method Method SetCurrentFont(fname:String) Self.CurrentFont = TGLFont(Self.fonts.ValueForKey(fname)) SetFont(Self.CurrentFont) End Method Method GetCurrentFont:TGLFont() Return Self.CurrentFont End Method end type sample: ... Global Fonts:TFontManager = New TFontManager ... Fonts.AddFont("courier_new_8_bold") Fonts.AddFont("courier_new_8_normal") Fonts.AddFont("verdana_10_normal") Fonts.AddFont("verdana_10_bold") ... Fonts.SetCurrentFont("courier_new_8_normal") DrawText("FPS: " + UPS(), 10, GraphicsHeight() - 16 * 2) Fonts.SetCurrentFont("courier_new_8_bold") DrawText("FPS: " + UPS(), 10, GraphicsHeight() - 16) ... ' get current font Local actualfont:TGLFont = Fonts.GetCurrentFont() ... 'set default font back Fonts.SetCurrentFont("Arial9") Quote [HW] C2D Q6600, 4GB RAM, NV8800GTX, Vista Ultimate x64 [sW] Blide Plus, BlitzMax, Delphi, C++, 3DWS 5.53, Leadwerks 2.xx
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.