Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - forrestcupp

Pages: [1]
1
SFML projects / cpGUI - Anyone interested in developing?
« on: April 22, 2010, 03:25:43 pm »
A while back I created cpGUI to support my personal needs.  I thought maybe it would be useful for others, so I released it in the Wiki under the zlib/png license.  It's great that there has been a lot of interest in this, but with interest comes the need for support and continued development.  

Unfortunately, I no longer have the time to invest in this project.  So if there is anyone interested in taking over the lead for this project, please feel free.  The license is pretty free, but it does need to still be honored.  But that shouldn't cause any hindrances.


A few notes for anyone interested:

For some reason, cpGUI doesn't seem to work with the most recent release of SFML, even though that release wasn't supposed to break anything.

You will probably want to start porting a 2.0 version.

When you package your changes to the code, you will need to update the Wiki and find a place to host your new files for people to download.

When you make significant changes, please update the Wiki to let people know you are the one working on it so they won't try to contact me about your changes.

I really don't care what you do with it as long as you don't ruin it and blame me. :)

2
SFML wiki / New wiki page for cpGUI
« on: August 08, 2009, 06:51:58 pm »
cpGUI is an easy to use, object oriented GUI toolkit based on SFML 1.5.  It's released under the zlib/libpng license.

I've put up a detailed wiki page in the English Projects section that can be found here.  You can download the files from the wiki page, and also see a screenshot.

The wiki has a description of all of the classes and the user functions in each class.

Hopefully someone can get some use out of it.

3
I was working on some GUI stuff to use in my SFML projects, and it ended up turning into a decent object oriented GUI toolkit.  It's object oriented, and extremely easy to use.  

I figured it might be useful to people, so I'm going to release it under the zlib/libpng license like SFML.  It is called cpGUI, and it's based on SFML version 1.5.

It includes the following controls:
* Normal highlightable Buttons with a text label
* Image Buttons that are based on an sf::Image
* Shape Buttons that take an sf::Shape and turn it into a clickable button
* Check Boxes
* Selection Boxes with the ability to add choices.  It uses a scroll bar when necessary
* Drop Down Boxes with the ability to add choices and set maximum depth. A scroll bar is used when you reach your maximum depth.
* Text Input Boxes - a one line box for inputting text.  It has a blinking caret, but it is non-editable
* Text Boxes for loading a simple text file and displaying it.  The Text Box will automatically word wrap the text according to the size of the box you create.  This is useful for displaying instructions or licensing info. Text Boxes are non-editable and read only.
* A GuiContainer class that contains all of your objects - used for setting focus, and also some other things under the hood.

Almost all of the work is done for you, and it is very simple to use.  In most of the controls, you can easily customize the colors, fonts, size, & position.  Each object can return its state and tell you if the mouse enters or exits the control, and can tell you if the button was clicked or if it's down.

If anyone is interested, I can upload it and put it in the wiki when I have time.  I'll post a screen shot that includes all of the available controls.  If I post the files in the wiki, I'll include the example code for the screen shot with lots of comments explaining how to use cpGUI.

Update:
I have added a built-in font manager to help save on resources. Now, rather than having a separate font for each object, new fonts are only loaded when necessary. Also, when a font is no longer used by any object, it is automatically deleted. Other than cpGUI's default font, you will never have an unused font in memory.

This is all automatic, and it doesn't change how cpGUI is used.

Thanks to “Meltra Bour” for pointing out the need on the forums. Thanks to “l0calh05t” & “Wavesonics” for helping me learn how to implement this.

**Major Update** - 9/28/9

See this post for details.  Includes functions for setting mouseover color, bug fixes, and separate files to include only the controls you need for your project.

**Update** - 9/29/09

See this post for details.  Update includes various tweaks, bug fixes, and now cpGUI has static libraries.


You can download the latest update in the Projects section of the Wiki.



4
Window / Caps lock
« on: August 04, 2009, 07:39:41 pm »
I noticed there is no Key Code for the caps lock button.  You pretty much have everything but that.  Is there any other cross-platform way to tell if the caps lock key has been pressed?

5
General / mouse wheel from sf::Input
« on: August 03, 2009, 11:33:33 pm »
Is it possible to get mouse wheel movement from an sf::Input instead of from an sf::Event?  If not, this would be a very useful thing to add.  

I have a class with a function that takes a pointer to my Input, which means it has to be called after the Event loop.  I need to get mouse wheel movement in that function.  I tried passing a pointer to the RenderWindow as a parameter and calling GetEvent.  Since it's after the Event loop, that only works about once every 5 times the wheel is moved.

I'd really rather not have to have a whole separate function just to get wheel movement.  Is there any way around this?

6
General / Is clock memory/processor intensive?
« on: July 31, 2009, 10:38:10 pm »
Would it slow things down a lot or make my program bloated to have 10 sf::Clocks at one time?

7
General / Background image & Loading from resources
« on: July 26, 2009, 04:56:06 am »
I'm just starting with SFML, and so far it looks pretty easy and efficient.  But I have a couple of questions that are probably simple.

First, I saw the resource manager code in the wiki.  I saw its implementation for images and audio buffers.  My question is this.  Is this the code I should use if I want to put all of my images and audio files into a resource script to compile it all into my exe?  If not, what is the proper way to load images and sounds from a resource script?

Secondly, if I want to display a background image that is around 800x600, do I just use a large Sprite to do that?  Basically, is everything graphical that I draw just a sprite?

Pages: [1]