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.


Messages - forrestcupp

Pages: 1 2 3 [4]
46
Window / Caps lock
« on: August 06, 2009, 03:45:49 pm »
Because I'm creating a text input box.  When people press the caps lock key, they expect their text to be capitalized.  If I have no way of detecting if they press it, I have no way of making it behave like the user would expect.

Basically, my reason for wanting this is the same reason that the key exists.

I can do it using win32, but I was hoping for a cross-platform way to do it.

47
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?

48
General / mouse wheel from sf::Input
« on: August 04, 2009, 12:43:44 am »
I understand what you're saying.

I found another way to implement what I need to do without using an extra function, so I'll be alright anyway.

Thanks.

49
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?

50
General / Is clock memory/processor intensive?
« on: August 01, 2009, 04:06:39 am »
Thank you.

That's good to know.  I actually figured out a better way to implement what I'm doing with only one clock.  It's still good to know, though.

51
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?

52
General / Background image & Loading from resources
« on: July 28, 2009, 08:55:01 pm »
Quote from: "4ian"
Instead of a zip file, which is easy to modify, you can use a DAT file. There is a tutorial on the french wiki : http://www.sfml-dev.org/wiki/fr/tutoriels/formatdat
( Even if it is in French, you the comments are in English. )

Sweet!  If I can't load from a resource script easily, that's definitely a good solution.  Thank you.

53
General / Background image & Loading from resources
« on: July 28, 2009, 02:37:09 am »
Quote from: "forrestcupp"

Another reason I want to hide my resources is so players can't just look at all of my graphics and know ahead of time what a level is going to be like.

That's my main reason.  It shouldn't matter what my reasons are anyway.  It's a common practice to put graphics and sounds into a resource script.

If I create my own file extension, will SFML be able to read it?

54
General / Background image & Loading from resources
« on: July 27, 2009, 03:03:04 pm »
Interesting.  How do you extract the files from within SFML?

Another reason I want to hide my resources is so players can't just look at all of my graphics and know ahead of time what a level is going to be like.

55
General / Background image & Loading from resources
« on: July 26, 2009, 10:34:40 pm »
That would be cool if that's possible.  Do you know of any code examples of how to do that?  I don't have any idea how I could do that.  I can't even really find any examples of how to load things from memory.

I don't really care about encryption, though.

56
General / Re: Background image & Loading from resources
« on: July 26, 2009, 08:07:32 pm »
Quote from: "Nexus"
No, and that's rather not SFML's task. I think some IDEs support resources being compiled into the exe, but I am not sure because I haven't used this feature yet. Do you really need that, why don't you load resources at runtime?
Well, I can load them at runtime if I have to.  One nice thing about loading from resources is that it eliminates one way for people who don't know what they're doing to screw things up.

In wxWidgets, there isn't direct support to load certain things from resources, but there are ways to do it with streams.  I was thinking that since SFML can load images and sounds from memory, maybe there's a way to do it from resources.  But if so, I can't really find any instructions on that.

But if there's no way around it, I'll just load the files at runtime.

Quote from: "Nexus"
No. For example, there are also displayed fonts (sf::String) or graphic primitives (sf::Shape). All the classes derived from sf::Drawable can be drawn. In the tutorials those things are explained further.
Right.  I wasn't really thinking of those when I said that.  I guess what I meant is that every preexisting image is going to be a sprite no matter what it's size and purpose is, right?

57
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 2 3 [4]