Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Matrix1 Console Colour Constants

Author
Message
Chris Tate
DBPro Master
14
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 11th Jan 2012 00:48
Nothing major here, just thought it makes sense to let others make use of this. Using the console colour commands, you can decorate your console.

Purposefully posted without a code block, here they are:
//==============================================
` Console Display Hues
#CONSTANT CONSOLE_BLACK 0
#CONSTANT CONSOLE_BLUE 1
#CONSTANT CONSOLE_GREEN 2
#CONSTANT CONSOLE_CYAN 3
#CONSTANT CONSOLE_RED 4
#CONSTANT CONSOLE_MAGENTA 5
#CONSTANT CONSOLE_BROWN 6
#CONSTANT CONSOLE_WHITE 7
#CONSTANT CONSOLE_DARK_GRAY 8
#CONSTANT CONSOLE_DARK_GREY 8
#CONSTANT CONSOLE_LIGHT_BLUE 9
#CONSTANT CONSOLE_LIGHT_GREEN 10
#CONSTANT CONSOLE_LIGHT_CYAN 11
#CONSTANT CONSOLE_LIGHT_RED 12
#CONSTANT CONSOLE_LIGHT_MAGENTA 13
#CONSTANT CONSOLE_YELLOW 14
#CONSTANT CONSOLE_BRIGHT_WHITE 15


If you have not already used the Matrix1 console, I fully recommended it for debugging your program without obscuring the display with text or having to keep loading a log file.

If you do have a DBPRO program that is full of errors and problems, but you are not aware of where the problem occurs; this provides a means to show where the problem is, by outputting messages detailing the parts of the program that successfully execute.

It is possible to create a utility, game or server application that runs in the console alone; useful for when you want to deal with a text grid rather than pixels. You also get scroll bars as standard!

TheComet
15
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Jan 2012 15:12
I wish I heard of this earlier... I've already programmed my own console.

Is there anything Matrix1 Utils doesn't have?! For every problem I get in the future, I'm going to approach it with "Does matrix1 fix it?".

TheComet

Chris Tate
DBPro Master
14
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 11th Jan 2012 15:46
Quote: ""Does matrix1 fix it?"."


A common question indeed; the Matrix1 help documentation is bookmarked in my browser; I view the help often because there is alot of commands in it that apply to most situations; but it is difficult to memorize at first, but your life gets more easier the more you study the documentation and play around with stuff.

Login to post a reply

Server time is: 2022-11-30 14:53:22
Your offset time is: 2022-11-30 14:53:22