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 - David

Pages: 1 ... 3 4 [5]
61
SFML website / Typo
« on: May 23, 2011, 03:00:37 am »
Well, technically, "si" in spanish means "if"  :P

62
Graphics / Need clarification...
« on: May 23, 2011, 02:37:55 am »
I'm still confused about the sprite class (I'm use to actionscript)

How do you change from one picture to another, like in a walk cycle?

63
Graphics / Mmk
« on: May 23, 2011, 01:00:39 am »
I know that SFML is not a game engine (I came from actionscript)

But is there a way to do the same with a torus/doughnut-shaped health bar?

64
Graphics / Health bar?
« on: May 22, 2011, 11:41:45 pm »
How would you display a simple health bar in SFML?

65
Window / That annoying little window
« on: April 28, 2011, 02:45:30 am »
Quote from: "Fred_FS"
Quote from: "Mjonir"
My project is aimed at both scripters (who really need the console) and their end-users (who don't need/want to see the console). So at the moment I do have multiple build targets, but I'd be force to release two different versions of my program, one with the console and one without. If I could control that in the application itself, I could only give only one build and control that in the configuration file. It's not an absolute need, but it'd be neater if it's easy enough to control.

I'll have a look at Windows.h then. I hope it wouldn't break portability too much to do it this way though :?

It is probably not as easy as you wish. Once you have created a new console-window you  have for example to redirect the standard input and output streams to this window.
It is possible and described here, but it is rather complicated.

But I have an easy suggestion for you. Just create a console-application and if you don't want to show the console window, use
Code: [Select]

ShowWindow(GetConsoleWindow(), SW_HIDE);

to hide it(Further information).

I think hiding an existing console is easier than creating a new one ;).


So would
Code: [Select]
ShowWindow(GetConsoleWindow(), SW_SHOW); also work?

66
Window / That annoying little window
« on: April 28, 2011, 01:55:46 am »
Quote from: "cooldog99"
You don't need code to remove the console window :)

Project -> Properties -> Build Type -> it SHOULD say Console application, change it to Gui Application.
Make sure to set it to same on Debug AND release (on left) or whichever you prefer :D

Note: May require you to restart codeblocks, sometimes it does for me.

Hope this helps.


Wow, jeez, I comPLETELY forgot about the GUI application option :shock:

Thanks a bunch  :D

67
Window / That annoying little window
« on: April 27, 2011, 11:55:37 pm »
I just started using SFML a few days ago :shock:

Whenever I run the code in Code::Blocks, the little CP-like window (I forgot what it's called) pops up along with the window that displays the images :evil:

How do you get rid of this window by code :?:

68
Graphics / Re: Events
« on: April 27, 2011, 11:50:44 pm »
Quote from: "Fred_FS"
Quote from: "David"

Can you do this? :?
Code: [Select]

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Shift)) {
    // Do here what you want to happen when the user presses shift
}



You can do it in a very similar way. Key Event has special variables to check, wether shift, control or alt was pressed or not.

Code: [Select]

if ((Event.Type == sf::Event::KeyPressed) && Event.Key.Shift )
{
    // Do here what you want to happen when the user presses shift
}

So this should work.


That fills the missing gaps. Thanks for everyone's contribution to this :D

69
Graphics / Re: Events
« on: April 27, 2011, 07:05:04 pm »
Quote from: "Dimple"
Quote from: "David"
Your explaination helped

And for the Events part, I just want to know how can you program a key listener so the user can press the SHIFT key and make it do something

There is no need for a key listener (Java programmer?). If you want something to happen when the user presses shift, you can do this (inside the event-loop):
Code: [Select]

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::LShift)) {
    // Do here what you want to happen when the user presses shift
}



Can you only do it on one of the shift keys? :?:

Can you do this? :?

Code: [Select]

if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Shift)) {
    // Do here what you want to happen when the user presses shift
}


Or this?

 :idea:
Code: [Select]

if ((Event.Type == sf::Event::KeyPressed) && ((Event.Key.Code == sf::Key::LShift) || (Event.Key.Code == sf::Key::RShift))  {
    // Do here what you want to happen when the user presses shift
}

70
Graphics / Events
« on: April 27, 2011, 04:33:54 pm »
Your explaination helped

And for the Events part, I just want to know how can you program a key listener so the user can press the SHIFT key and make it do something

71
Graphics / Sprite Help
« on: April 27, 2011, 03:48:43 pm »
I just started SFML a few days ago, and I need an explaination on the sprites tutorial :?

Is it saying that you take small sections of a sprite sheet and displaying them accordingly or is it saying that you have to upload all of the images and then displaying them :?:

Can someone also help explain the Event function? I'm kinda confused

I'm using Code::Blocks if that helps, which I doubt :wink:

Pages: 1 ... 3 4 [5]
anything