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.

Dark GDK / (C++ / DGK) Timidon's Gui

Author
Message
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 16th Nov 2008 06:08 Edited at: 16th Nov 2008 06:10
Here is Timidon's Gui

this is the "include" file


Here is for Code Example (this is the main.cpp)



You will need to upload Media for the demo. I will work up some more docs on better on how to use this. This is a bare bones demo, that shows the basics.

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 16th Nov 2008 06:18 Edited at: 16th Nov 2008 06:19
Feel free to make any changes you wish, if you can figure it out. I have been using this for about a year or so.

General Installation Instructions:

1) Create yourself a new DGK project, 2d or 3d will work with each.

2) Goto the Projects Tab and "Add New Item" > "Header", name it TimidonsGui

open it up and then copy and paste the "include" code snippet

3) Next replace the main.cpp with 2nd code snippet.

4) Download the media package, install the media into the same directory as your project.

5) compile and run.

Oh if that does not work, I zipped up those two files also in this post.

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 16th Nov 2008 06:29
Drats, here is the Loading Splash screen for the example. Download it and drop it into the same directory along with the main.cpp

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 16th Nov 2008 06:34
Here's a screen shot, of what it should look like after it is all done

Enjoy.

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Swordsman
15
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 16th Nov 2008 13:47
Nice, looks good. The amount of comments within the code looks good too, but it seems to suffer from the same affliction as many other around here, USE C++ FEATURES!
You can stick all of this quite nicely into a class, yet it is a C based snippet. I'm not having a go, just saying that if you were willing to put this in too a class system, it would be much more modular and I'd definitely use it
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 16th Nov 2008 15:49
The external images look nice, but I'd stick to my own system, only because it doesn't depend on media, making for near instantaneous loads, easier modification, &c. I'd have to agree with Swordsman, classes are the way to go. I tried to use struct and typedef to make a window and form element system, and it was just too slow and inefficient.


My site, for various stuff that I make.
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 16th Nov 2008 17:07
"Nice, looks good. The amount of comments within the code looks good too, but it seems to suffer from the same affliction as many other around here"

.. being very amateur at we are doing.

Thanks

"The external images look nice, but I'd stick to my own system, only because it doesn't depend on media, making for near instantaneous loads, easier modification, &c. I'd have to agree with Swordsman, classes are the way to go"

Still attempting to grasp class's. My main reference book "The Waite Group's New C Primer Plus", which covers ANSIC, UNIX, Microcsoft C and Turbo C. Falls short on class's. Also note the copyright is 1990. It's 18 years out of date. Wow.

I am still happy with my basic gui. Still looking at ways of improving it. It handles button clicking. Handles text input and can toss some on the screen. It's not much of a windowing system (like SunDawg - which is nice).

Oh and here's another screen shot of the gui in a semi functional game.

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 16th Nov 2008 17:11 Edited at: 16th Nov 2008 17:14
Here's the navigation menu screen shot..

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Swordsman
15
Years of Service
User Offline
Joined: 12th Nov 2008
Location: Wigan, England
Posted: 16th Nov 2008 20:25
Looks really nice.

There's a lot of free materials on the web concerning OOP and programming in general. Here's a couple of excellent websites to get you started:

http://www.oopweb.com/
http://www.scriptol.org/list-of-algorithms.html
http://e7l3.org/classics.html
http://www.stackoverflow.com/

As far as books are concerned, I have a particular reading list that I tend to tell people:

Code Complete (2nd Ed.) by Steve McConnell
The C++ Programming Language by Bjarne Strousoup
The Art of Computer Programming by Don Knuth <----This is a hard read, but you will never learn more from anywhere else

I think the first book which I read on C++ was by Herb Schmidt, but apparently his reputation has suffered from some bad mistakes/advice in some of his books.

CProgramming.com and GameDev.net are always useful references, both of their tutorials and forums are invaluable too as is MSDN.

Classes are one of those things really that can't be fully understood until you start to build them. You should read some of the above websites and try to make your system more Object Oriented. We're always only a post away if you get stuck somewhere
Timidon
18
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 17th Nov 2008 01:54
Thanks. I will poke at it. You can never have enough reference material.

There are many answers but just one question" ~ Jerilith the Mad

Login to post a reply

Server time is: 2024-04-23 12:04:23
Your offset time is: 2024-04-23 12:04:23