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

Pages: 1 2 [3]
31
SFML projects / Roller coaster simulator
« on: July 04, 2009, 12:43:12 pm »
The buttons are bordered rectangles which check if the mouse is in their boundaries every time the mouse is down.

When you set up a button you give a top left vector, a bottom right vector, text for the button to display and a function pointer which the button will call if it is clicked.

I don't know what you mean by "Is it really a GUI system or just hardcoded stuff?" but the GUI_Manager, Button and Label classes could be used with any other SFML project just by copying the files and passing them the correct data when constructing them.

32
SFML projects / Roller coaster simulator
« on: July 04, 2009, 11:18:39 am »
I hadn't even thought to post it on the SFML forums, but I just realised, after making it a few weeks ago for my final computing project that you guys might like it.

YOUTUBE VIDEO OF IT BEING USED






Hope you like it :D

33
General / SFML applications won't run on XP tablet edition
« on: May 07, 2009, 05:27:19 pm »
Yeah, they are installed, we even tried it on another tablet PC to make sure that it was that causing the problem... hmm.

34
Window / Getting the window handle
« on: February 20, 2009, 03:17:52 pm »
I'm drawing 41 circles and 40 lines, as well as 4 rectangles and 4 bits of text.

CPU usage is 39%, which is 78% of one of my cores.
I have a Sleep(5) in there to help a bit, without it it's 50% CPU (100% on one core).

35
Window / Getting the window handle
« on: February 20, 2009, 02:58:10 pm »
Argh.

This is annoying. I don't think it's worth going into SFML and modifying it, but at the moment its rendering constantly with a Sleep(5) in it, which is fine for a game, but this will sit there, perhaps minimised, perhaps behind other windows, just doing nothing, waiting for a teacher to use it. This is a big problem because its CPU usage is so high.

I want to only render when something on screen has changed. Unfortunately that is not a possibility because any window passing over it would then screw up what is painted on my window because i don't have access to the paint event.

I guess I'll just have to render once every 200ms or something unless something changes, in which case I will render it instantly.

Thanks for your help.

36
Window / Getting the window handle
« on: February 20, 2009, 02:30:48 pm »
Ok, cool. Right now though, I need a solution, I have a deadline.
So how can I get the hWnd?

37
Window / Getting the window handle
« on: February 20, 2009, 02:23:59 pm »
First (not of great importance), the window needs repainting when it is moved off screen. If you drag the window under the task bar and move it out again you get an ugly smudge across your window.

Second and this is the important one, I need a way to reduce my CPU usage when the window is not in focus. I also need to be able to check if the window is minimised and reduce my CPU usage then.

38
Window / Getting the window handle
« on: February 20, 2009, 02:11:52 pm »
No, it isn't.
The co-ordinates given in Event.MouseMove.X and Event.MouseMove.Y are pixel based, therefore a fullscreen window has more pixels, but everything is stretched, so the new pixel values of the buttons are wrong. I could have fixed it with finding the window size, but i decided to lock the windows size, besides, i fixed that by fixing the size.

I need to know how to get the window handle.

39
Window / Getting the window handle
« on: February 20, 2009, 01:03:46 pm »
I'm using SFML for my A level computing project, a physics simulation for my school.
I have a problem however, as I made my own GUI system and I am using SFML's input system. When you make the window size different, the mouse position is incorrect, so clicking a button will click somewhere entirely different.

How can I stop the window from being resized or made fullscreen?

Also, I'd like to be able to get the hWnd, how can I do that?

Problem 1 solved
Code: [Select]
sf::RenderWindow* rwindow = new sf::RenderWindow(sf::VideoMode(800, 600), "Roller Coaster Simulator", sf::Style::Close);

Now, how can I get the hWnd?

Pages: 1 2 [3]