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.

Author
Message
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 4th Aug 2008 20:07
ya i actually fixed those bugs already i just havent uploaded the new version.

And yes basically i create a bitmap. draw the background sprite image. then draw the text and render it back to an image.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Aug 2008 20:14
Sounds like that would be costly, but I didn't notice any speed issues at all even while typing in the text field.


Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 4th Aug 2008 20:15
just uploaded the newer version

http://www.vigilart.com/demongui.zip

still working on comboboxes at the moment

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 4th Aug 2008 20:17
ya doesn't seem to be much of a slowdown. it only renders it when text is added or deleted.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 4th Aug 2008 20:18
that and it was the only way to get alpha levels on text

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Aug 2008 20:34
What if you want an alpha background but keep the text completely opaque?


Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 4th Aug 2008 20:40
hmm id have to make the text an independent sprite of the BG then. which honestly wouldnt take much work. in fact it may even make the rendering process a little faster.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 4th Aug 2008 21:47
i got visual C++ now so ill see what i can do about making this a plugin. one question though. if i use dark gdk for plugins for use in DB Pro do i or anyone still have to buy a license to sell the game?

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 4th Aug 2008 22:14
jepp lance it will work yust fine as an include file as the user then will not have to browse thru all your gui code when going thru there project code.
they probably thought they where going to have the gui code together with there own and not separate dba files
i have done apps with a couple of thousand lines of code with no drawbacks yust a hell lot of code to browse
cheers
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 5th Aug 2008 18:15
so what if i made every aspect of my game in C++ as a plugin then did a main loop and called the c++ code from DBPro.

would i still need to buy a commercial license for Dark GDK or can i get away with that?

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Neuro Fuzzy
16
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 6th Aug 2008 02:52
!..!,

Looks great!

ambitious (and worthwile) project, i'm sure many people will implement this into their games.

XD
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 6th Aug 2008 18:27
right now im attempting to convert this source to C++ and make it a plugin.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 6th Aug 2008 19:22
@Lancewrath,

This looks like it's going really well - looks like good progress is being made. Keep going!

You may find this interesting (maybe not, but thought I'd throw it out there for for something to think about)...

One idea I had for making a GUI system was to completely use BLUEGUI2 webBrowser objects for all my windows. This allowed me to create all the window contents as HTML form widgets. When a button was clicked (or a form value was changed, or any number of other things), the form and action was submitted to the localhost on a reserved, bound port (using IanM's Matrix28 Utils to create a TCP listening socket). Which allowed DarkBASIC to receive GUI interactions from the HTML forms.

This provided some great benefits for free:
1) I could use Javascript for all widget functionality including input validation, button rollover animation, expanding/closing sections of the window, dynamic content generation, etc...

2) I could use Cascading Style Sheets to allow extreme fine-tuning of the exact look and feel of all content.

But the problems I ran into with BLUE that (currently) make the solution unusable are:

1) BLUE's webBrowser components "blank out" if you try to set their conents more than once. This is a showstopper bug since I need to be able to re-write the contents of all windows on a regular basis (for example when new chat text is received).

2) BLUE's transparency for windows if unbelievably expensive on the fps - in all cases I've tried a window with no transparency runs at 700+ fps, but turn on transparency and it nosedives to 4 or 5 fps :/

...so, why am I telling you all this?

If you could create the equivalent of BLUE's webBrowser gadget that solved those 2 problems, you could basically tap into all the existing gui functionality of HTML, JavaScript and CSS for free (without having to actually code any of it on your end)...

...and I can tell you if you could pull that off, I'd be the first in line to use it

....well, thanks for listening to my ramblings, gonna download your latest version and check it out - looks great !!!

Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 6th Aug 2008 19:39
hmm. i have more experience working with WINAPI, i think it would be easier for me to access the commands in win32.dll and user32.dll to achieve the same effects.

from what i understand both those dll files i believe the functions are set already for exporting. so its mostly a matter of making a wrapper for DBPro for those DLL files. In doing so you should be able to access WIN32 styles like transparency and such without as much of a slowdown. but thats theoretical.

i havent officially used bluegui so i dont know how it works exactly.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 6th Aug 2008 20:18
This GUI system really comes at an ideal time. Ric is no longer selling GUIStudio, and support is going away soon; and I don't know what the status is with Rob and BlueGUI - the last release of BlueGUI was November 2006.

I hope you are able to achieve cheap transparency for windows objects (and all contained objects) using the WINAPI route -- that would really be nice

Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 6th Aug 2008 21:16
i'd have to look into it.

after i finish this INNER Gui system i'll work on an OUTER gui

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 7th Aug 2008 02:19 Edited at: 7th Aug 2008 02:41
@Lancewrath
By an outer GUI I assume you mean something like this? Also, about the GDK you can just use this, which is royalty free, free to use, and works in C++ (The command names are the same as in DGDK).

Cheers,

-naota

I'm not a dictator to those that do stuff for me by will. Only those who don't.
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 7th Aug 2008 06:57
yesh and yesh

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 7th Aug 2008 18:21
The only problem with DBPro and large amounts of code is that it takes a long time to compile People don't want to have to compile a whole GUI system every time they compile their project. (Hence why there are so many scripting languages available!)

Yuor signutare was aresed by a deslyxic mud...
Curious? CLICK HERE!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 7th Aug 2008 18:23
i found that making a windows gui lib wont take near as long. i may just do that first actually.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Zubby1970
AGK Backer
15
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
Posted: 7th Aug 2008 19:12
are the graphics going to be interchangable, there cool, but might not always fit into the programmers scheme?

Keep up the good work its really cool

There can only be one
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 7th Aug 2008 19:39
ya you just change the skin folder

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 8th Aug 2008 04:09
Ok so I is making a dll for Demon gui, and ill make a WINAPI dll too this way i can release an in game gui and a "editor" gui, free of course. i guess its a good thing you guys told me to do this early on before i got too far into it using DBP code .

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Neuro Fuzzy
16
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 8th Aug 2008 06:37
yeah, i'd think that Button boces, progress bars, scrollbars, and tabs, would be the most important.

XD
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 8th Aug 2008 08:22
ZOMG damn it took me forever to modify express C++ to give birth to a usable dll in DBPRO. damn you have to make alot of changes to the options. and worst of all there is no resource editor. Bleh.

Anyways i got a couple functions working in DBP now. so i can finally start converting the code over.

BTW if you have had trouble producing a dll in VSC++ Express go here

http://www.graphicscode.com/Articles/VCExpressGotchas.html

Follow all the changes execpt this


Project → Properties → Configuration Properties → C/C++ → Code Generation → Runtime Library

Set the /MT option.


leave it as it is /MD i believe for Dlls is fine.

I found that VC++ doesnt like LPSTR and wants you to use LWCPSTR or something like that. in doing so all my text came out as japanese kanji lol.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Aug 2008 12:29
Just use char* It's the same thing.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 8th Aug 2008 17:40 Edited at: 8th Aug 2008 17:42
i got LPSTR working now so its fine

im just glad i was able pass a class pointer to dbpro and back again

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Destrugter 1
17
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 11th Aug 2008 19:35
WOW! This looks AMAZING! Keep up the good work Lancewrath...if only I could make something 1/1000000th as good as this! =)
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 12th Aug 2008 08:02
almost caught up writing the dll

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 13th Aug 2008 00:42
BTW DevCPP + Vista = Headache.

Phew got it working now. Ok finally i can get this damn plugin going.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 14th Aug 2008 05:31
i know it doesnt look like much, but it was created with a dll plugin





LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 14th Aug 2008 10:24
Checking for compatibility issues. so long as the skin folder is the same dir as the main app you can paste in the code. didnt cause any problems so far.



LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 18th Aug 2008 01:59
just a progress update.

i decided to hit this early before i got too far. I have Z indexing working properly now. so active window goes on top then is shuffled back one when a new window is activated. Windows should overlap in the order they were activated.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 18th Aug 2008 13:38
This looks great, it looks perfect for use in Geisha House.


Come see the WIP!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 21st Aug 2008 18:25
playing around with an XP-ish skin and testing to make sure i can use two different skins at the same time. all of this is now in a DLL plugin. now i can get back to putting in the gadgets.



LIKE OMFG IM TEH KING OF TEH INTARWEB!
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 22nd Aug 2008 14:48
Great work Lancewrath, did you ever have a go at doing a GUI in dbp before creating this dll plugin, also what is actually being drawn to the screen, are they sprites or images, just wondering what the performance is like?

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 22nd Aug 2008 18:19
ya originally this gui was written in DBP, but everyone wanted it a plugin instead. so now im writing it in C++.

those are sprites being drawn.

performance seems ok. i tested the DBP version out in some 3d apps. wasnt any slowdown really of using gadgets and having multiple windows.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 23rd Aug 2008 07:40
@Lancewrath,

Hmmm, this looks like it's rolling along rather quickly. Looks like it may be time to start putting in bids for gadgets

I've tried out more than my fair share of sprite-based GUI systems in DBPro and some of the real headache gadgets to implement were combo boxes (both with and without keyboard entry allowed) - if your GUI could provide those natively, it would be awesome. Richedit boxes that allow various forms of text justification are also on that list of "very hard using just sprites, but very necessary for large games" list.

Next would probably be native implementation of rollover buttons so that the Disabled, Enabled, Hover, and Click styles for the button are all defined in the skin. It looks like you've already got the ability to have buttons dynamically generated so 1 set of skins can already create any number of buttons with any number of text labels -- so, I won't mention that

Third would probably be a clean and easy way to create all GUI elements based on the _proportion_ of the screen space you want them to take up so that you get the same layout regardless of the screen resolution. So, for example, you might want to build a Frame gadget that is always 100% the height of the screen, but only 20% of the width. For this to be really, really useful, you could also define a gadget's size relative to its parent. Using the same example, I could then define a button in the Frame I just created that was 80% of the width of the Frame, but only 5% of the height. Font sizes for the button labels would have to dynamically adjust according to the screen resolution too if you went this route.... that might be a bit tricky.

...just my US$0.02 -- hope this helps you think about some of these issues early on where they are much easier to tackle

Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 23rd Aug 2008 17:34
doing the screen resolution may be tricky. considering the windows proportions are set by pixels in width and height.

i have already started working on an easier system for making complex gadgets like comboboxes.

what i have done is windows panels and all other gadgets share the same base class type. Lets say when i create a combobox. it will have a children linked list which would contain a Panel, a textfield and a scrollbar. combining these gadgets together would give me. a textfield used to display the active gadget item which can be edited. the panelgadet as a container for the list items. and a scrollbar gadget to scroll through the contents.

ive written some fairly complex gui libs before in Blitz.

as far as emulating RTS its not that hard at all actually. using text commands a can create a linked list of the text within a gadget. break it apart into sections divided by formatting . in the front end i throw all of them together with the formatting applied to generate a RTS look.

panelgadgets are probably an overlooked gadget by most creators of GUIs you find gadget creation is much more simplified using a chil;dren list for more complex gadgets consisting of already functional less complex ones.

For instance a tab system would bea combination of panels and a button based toolbar.

A menu is a collection of panels and labels that can generate events based on user clicks.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 23rd Aug 2008 17:39
on a side note im thinking of adding a simple INI parser which you can specify some other aspects of the skin file within the skin directory.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 24th Aug 2008 06:57 Edited at: 24th Aug 2008 07:05
Alrighty. i just added support for INI files.

basically just pop it in the skin directory and all the little settings like font colors size and fontname are all configured.

looks like this

skin.ini


already got buttons done now im on to textfields. Nearly caught up in C++ to where i was in DBPRO.

this here was created using ini

this is all you have to code now to create windows




i'll be adding an event system here as soon as i get majority of the main gadgets done.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Alsan
18
Years of Service
User Offline
Joined: 20th May 2005
Location: Germany - Nähe Kassel
Posted: 24th Aug 2008 13:50
That looks extremely impressive. Great work.

Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 27th Aug 2008 05:22
/emote stops by Lancewrath's desk and drops off a refreshing beverage of his choice to help him work on this

...ok, that emote prolly won't be in OMEN - I'll try shortening it up a bit

Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 27th Aug 2008 06:49
lol.

quick question.

should i create a gadget specifically designed for user GFX input. Aka Canvas gadget. which would work great for Minimap, Character profile, material editor, image previewer.. etc etc

its too bad BDpro doesnt have a 2d viewport command like blitz does. however i can easily emulate that with bitmaps.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 28th Aug 2008 17:17
@Lancewrath,

I don't know about other developers, but I myself wouldn't have much use for a canvas the player could draw on.

Much more useful would be a canvas the client could _click_ on, causing a "click canvas" event to be raised on mouse_up that would populate the event array with the relative position of the click from the top/left coordinate of the canvas gadget (even if the gadget has been resized). This would be perfect for setting waypoints on a map (and lots and lots of other things).

So for example, if the image for the canvas is 1024x1024, but the gadget has been resized to 256x256 and the player clicks on the exact middle of the gadget it would still return x=512 and y=512 for the click position.

...hope that makes sense.

Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 29th Aug 2008 01:14
easy enough

LIKE OMFG IM TEH KING OF TEH INTARWEB!
Nathaniel
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Dallas, Texas
Posted: 29th Aug 2008 21:40 Edited at: 29th Aug 2008 22:01
@Lancewrath,

First off let me say thanks for all the effort you've obviously made in getting this GUI built for the community. I know numerous people will appreciate it.

Secondly, I can't speak for everyone here, but I can say I wouldn't have minded it being writting in DBP. I have a number of reasons for this including:

(1) Native code for DBP. In the end it should theoretically execute faster than an external .dll.
(2) A couple thousand lines of code? Either everyone here writes spaghetti code, or something. I've done thousands of lines in a general Pascal program, let alone anything more advanced. OOP or black-box programming is not small.
(3) Your doing it for free and I'd have dropped it if people complained about it.

In anycase, again thanks for all the hard work you're doing. And to everyone else who doesn't like the truth...

-N.

Not all who wander are lost. - J.R.R. Tolkien
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 29th Aug 2008 21:45 Edited at: 29th Aug 2008 21:45
ah well. originally it was in DBPro.

i havent noticed any speed issues yet.. using the dll.

i may make a DBpro source version at some point.

BTW got the buttons done. moving on to textfields now.

LIKE OMFG IM TEH KING OF TEH INTARWEB!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Sep 2008 17:32


Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 3rd Sep 2008 18:26
wow cool.

gee now i HAVE to get this done LOL

LIKE OMFG IM TEH KING OF TEH INTARWEB!

Login to post a reply

Server time is: 2024-05-04 15:10:45
Your offset time is: 2024-05-04 15:10:45