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.

DarkBASIC Discussion / User Interface

Author
Message
BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 29th Jun 2012 18:05
I am starting to grow tired of programming my own ui elements (basic input boxes, message boxes, etc) for applications in DBC. I feel like I'm just re-inventing the wheel. Is there a way to call windows UI from within DBC (I've tried .vbs files, but I can't seem to get a return value from them such as which button they pressed or what their input was)? Or has someone already created a windows-like ui dll or function collection?

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Jun 2012 00:33
TDK to the rescue: http://forum.thegamecreators.com/?m=forum_view&t=122181&b=6

Shh... you're pretty.
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Jun 2012 02:38
@BN2
It's never easy to manage a GUI in my opinion. I've done a lot of WinAPI work with DBC, but it's a pain in the butt even when having dedicated functions - and running in windows mode on DBC seems to kill some of the lighting options and responses. So if you want to do a couple of little things here and there, there are some useful functions in the WinAPI. But if you want a full blown application, it takes quite a bit of work.

With all that being said, the most complete GUI I've seen for DBC is Magic Windows, by freddix. However, it has 130+ functions, so it's a bit to take in. Though, it really is complete. I'll attach a zip file of the source and docs. I think I updated some of the functions to be at least SET FONT compatible with DBC 1.20 at least I know I had thought about it!

Enjoy your day.

Attachments

Login to view attachments
BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 30th Jun 2012 06:21
Thanks, guys! I'll take a look and put my own library in progress on hold.

@Obese
You wouldn't happen to have a saved copy of TDK's updated library, would you? The first one was uploaded and works, but all of his updated versions were hosted elsewhere and all the links are dead.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 30th Jun 2012 15:40
No, sorry I never used it I just remembered him posting it.

Shh... you're pretty.
Fluffy Rabbit
User Banned
Posted: 7th Jul 2012 03:50
It should be easy enough to write a scalable immediate mode GUI. I never did so myself because I never had a need for one, but an input box that would function in a loop is something I can use. For whatever reason, I could never figure out how to get a handle on all of the garbage characters that are outputted by the keyboard buffer.
BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 7th Jul 2012 15:59
I'm working on one right now, fighting some framerate issues. Due to lack of available time, I'm temporarily shelving it to work on a more serious project. Once that's out of the way, I can rework things to run faster and more efficiently.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Jul 2012 00:08
@BN2
I'm curious, did you try out MagicWindows? I've played with it a bit - really just the examples, but never really did anything with it.

Enjoy your day.
BN2 Productions
16
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 8th Jul 2012 04:42
@Latch

Thank you for reminding me. I downloaded it and I think I just got sidetracked with all the other stuff on my plate as of late. I had started my own library already when I posted this (part way in I thought that someone MUST have already done it).

I'll give it a try and get back

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Jul 2012 22:15 Edited at: 10th Jul 2012 22:43
@BN2

I decided to give Magic Windows a play and you know what, it's really easy to use! It only takes a couple of calls to get something up and running with pretty nice results.

I put together a simple 4 window demo. Three of the windows have random text scrolling in them each set to different colors. Then there is an fps window. You can drag the windows around, resize them, change their priority, close them if you like. It was really easy to do. And they overlap nicely.



Enjoy your day.

Login to post a reply

Server time is: 2020-08-05 03:23:10
Your offset time is: 2020-08-05 03:23:10