Console Module

BlitzMax Forums/BlitzMax Programming/Console Module

klepto2(Posted 2005) [#1]
To learn a bit about OOP and the usage in BMAX I have created
a little Module which creates and manage a Console.

Currently available commands:
Type Console:
Create(width,height,alpha,maxChars)
update()
SetStatus(st:int) ; 1 = Visible 0 = Hidden
Set_alpha(_al:Float) ; 0 - 1 Sets a new Alpha value
Return_Alpha():Float ; returns the current Alpha value
Return Status():Int ; returns the current Status
Return_last():String ; Returns the last entered String
SetFPS(F_ST:Byte) ; enables/disables FPS in the topright of the console
Send_Text(txt:String) ; Send a string directly to the Console (maybe good for debugging)
Set_CursorSpeed(_blink:int) ; sets the blink time of the cursor.

[Edit:]
Edited the Cursor to be independent from the framerate and added new command for the Cursor Blinktime.
The Code is not well written but doesn't use much CPU.

the Update method have to be at the end of your main loop(before the flip command).



And here a working sample :



and now enjoy.

BTW: Critic and Suggestions are welcome :)


klepto2(Posted 2005) [#2]
New Version available. Version 0.6 has some new things added and can be download now.

klepto2.kl.funpic.de/DL/

(ConsoleMod.Rar)

Features added:

change of the Object name (Console --> CConsole) in case of Confusion
Color setting
Adding of a Watchsystem (for Debugging and BetaTesting)
already compiled

more about in the Readme.txt and in the Sample

Please post your Opinions and your Suggestions because I want to know what I could make better (its my first Module).