Page 1 of 5

New Library - ConsoleX

Posted: Thu Jun 17, 2004 11:44 pm
by DoubleDutch
Here is a new library for you all... :)

http://www.doubledutchdesigns.com/download/ConsoleX.zip

-Anthony

Posted: Fri Jun 18, 2004 12:21 am
by tinman
Well...what does it do?

Posted: Fri Jun 18, 2004 1:26 am
by Sveinung
Doesn't seem to work... I use PB 3,91b.

I get an empty error requester, saying nothing...

So this is kind of useless for me...compiled example works fine!
That looked nice!

Sveinung

Posted: Fri Jun 18, 2004 1:52 am
by DoubleDutch
Sveinung:I have 3.91b1 and it works np.
I will try it on my other PC in the morning....

strange...

tinman: if you run the example you will see that its basically an easy console replacement - by this I mean if you have written a program with console and want to update it quickly you can do it with the commands given. You just add an X to the usual PureBasic console commands.
After you have done this the program can have any of the normal windows functions. The OpenConsoleX command returns the Window number - you can use WindowID() with the result to get the windows handle.
I used it to update a program I did a few weeks ago - it was very easy, console programs can be updated in a matter of minutes. They look much better and you can full screen them with the full screen windows icon, or zoom them to whatever size you want - just resize the window.

Posted: Fri Jun 18, 2004 2:29 am
by DoubleDutch
I have updated the library to V1.02 :)

http://www.doubledutchdesigns.com/download/ConsoleX.zip

Hopefully this may fix the problem that Sveinung had - please you you try it & and tell me if its now okay?

Also in V1.02 the OpenConsoleX command has been extended with optional parameters:

Code: Select all

result=OpenConsoleX([sizex,sizey][,x,y,w,h,title$])
optional sizex,sizey in characters
further optional window x,y,w,h and title!!!

TailBite is REALLY good, thanks Miguel aka "El_Choni" :)

..

Posted: Fri Jun 18, 2004 3:52 am
by NoahPhense
DoubleDutch wrote:TailBite is REALLY good, thanks Miguel aka "El_Choni" :)
El Rulez!! TailBite does kick as$..

- np

checking out your consoleX now

Re: New Library - ConsoleX

Posted: Fri Jun 18, 2004 3:55 am
by NoahPhense
DoubleDutch wrote:Here is a new library for you all... :)

http://www.doubledutchdesigns.com/download/ConsoleX.zip

-Anthony
kewl concept

- np

Posted: Fri Jun 18, 2004 8:07 am
by DoubleDutch
Thanks! :)

Glad to see it worked...

I will add some more commands now that will allow people to make programs originally written for console mode to be more "pleasant" to the eye.

l8r

Anthony

Posted: Fri Jun 18, 2004 9:00 am
by PWS32
Hi,
very very nice !!

can you include any functions ?

- SetCursorColorX
- SetCursorFlashX
- HideWindowTiltelbarX
- HideWindowFrameX
- SetSoftscrollTextX

Best Regards,
Peter

Posted: Fri Jun 18, 2004 9:19 am
by DoubleDutch
Thanks for the suggestions, some good ideas there. :)

I will make the OpenConsoleX function a little better - I will add FLAGS, so you can add stuff like a regular window - or take stuff away

This should be in by tonight - if i have any spare time.

If you use the returning result code, you can get the windowID with

Code: Select all

result=OpenConsoleX()
if result
  winid=WindowID(result)
.
.
  etc...
.
.
endif
CursorColorX(n) should be fairly easy - will do...
CursorFlashX(n) should be fairly easy - if its looping in "InputX()" or "DelayX(n)"
ConsoleTitle(string$) can be extended to make it slightly better

I will think about scrolling, but i never liked that about the original Console window - fixed screens seem better for apps.

Posted: Fri Jun 18, 2004 11:35 am
by Bonne_den_kule
Hi!
Nice library. So this use directX? Look at my console library; consoleExtended, maybe we can work together and make this to librarys to one! My library: viewtopic.php?t=11267

Posted: Fri Jun 18, 2004 11:39 am
by Bonne_den_kule
Which directx is the requriments?

Posted: Fri Jun 18, 2004 5:19 pm
by DoubleDutch
It just uses the normal 2D library and 2D sprites using purebasic, so I guess it uses DirectX 7 as a minimum - this is a quote from the PureBasic help:
This command tries to initialise DirectX 7
I will be putting more error checking into newer versions - I just wanted something to work for my own apps before now.

Your ConsoleExtended library is pretty cool too, yours is mainly for people who still want to use the real console mode - this library is just really useful for people who have programs written for console mode who don't need run in console mode anymore. They just want a "quick n dirty" way of upgrading them without too much hassle...

If you really want to merge the two libraries, I reckon it would be better if we both talk to Fred about how it will fit in with his plans - I'm sure he has ideas about what direction he would like the console library to go?

-Anthony

Posted: Fri Jun 18, 2004 10:52 pm
by DoubleDutch
New version (v1.03) :)

Now you can OpenConsoleX and set the windows flags!!!

Code: Select all

#window=OpenConsoleX([sizex,sizey][,x,y,w,h,title$][,Flags])
If you download the library zip from:
http://www.doubledutchdesigns.com/download/ConsoleX.zip

and look at example4.pb you will see how you can mix ConsoleX commands with PureTools commands. :)
* you do of course need the puretools library to do this! *

l8r

Anthony

Posted: Fri Jun 18, 2004 11:48 pm
by Sveinung
@DoubleDutch

Works fine with your new version!!!

Don't know what it was....but who cears
Works fine now!

Regards
Sveinung