one of the example source files shows using openconsole() and enablegraphicstext() (not sure of the exact name, as my PB is running on a windows laptop at home). Haven't figured out how to install it on Ubuntu yet. guess that's part of why Linux is not as popular.
In any event, the enablegraphicstext() function (procedure?) requires an argument of 0 to display console text in the character text mode and a 1 to display the text in the graphics mode. The example has a 1 in the argument, but when it is run, it is shown in the character based text mode. what's up?
console example doesn't make sense
-
- User
- Posts: 19
- Joined: Sat May 10, 2014 2:58 am
- Location: San Rafael, CA USA
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: console example doesn't make sense
A console always can display text only. The command is EnableGraphicalConsole(state) and the parameter determines whether the console can respond to the commands ConsoleLocate(), CosoleColor(), ConsoleCursor() and ClearConsole() or not. More robust console programs can be written in this mode such as games and form entry. The reason this is not enabled by default is that pipe redirection won't work in graphical mode. Using the full ascii character set in this mode, you can write some remarkably cool (oldschool) games.
And that's all I've got to say about that. - Forrest Gump.
And that's all I've got to say about that. - Forrest Gump.
Last edited by netmaestro on Mon Jun 06, 2016 4:05 am, edited 1 time in total.
BERESHEIT
-
- User
- Posts: 19
- Joined: Sat May 10, 2014 2:58 am
- Location: San Rafael, CA USA
Re: console example doesn't make sense
I remember seeing the two items you mentioned, but I did not understand that it has nothing to do with how the text is displayed. Does this mean that I cannot write console programs displaying the text in the graphics mode (fonts, etc.)? I am not a gamer, this would be business/database stuff.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: console example doesn't make sense
No fonts, just a bit of fancy footwork. It sounds like standard gui forms and controls would suit your purposes better. PureBasic doesn't lack for those tools.
BERESHEIT
-
- User
- Posts: 19
- Joined: Sat May 10, 2014 2:58 am
- Location: San Rafael, CA USA
Re: console example doesn't make sense
Thanks, I'll put my my design thinking in that direction.