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 - G.

Pages: [1] 2 3 ... 56
1
General / Re: Simple math
« on: Today at 07:33:08 am »

2
General / 🍛
« on: July 13, 2020, 02:18:26 pm »
They are swapped in the vector, but their coordinates are never modified so you won't see any difference when you draw them.

3
General / Re: Changing the world origin in C++ SFML
« on: July 01, 2020, 09:04:09 pm »
True, true...  ;D

4
Feature requests / Re: crossfading images
« on: June 30, 2020, 11:08:44 am »
Set the color of the sprite you want to fade to a progressively more transparent white.
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Sprite.php#a14def44da6437bfea20c4df5e71aba4c

5
General / Re: Changing the world origin in C++ SFML
« on: June 28, 2020, 06:35:51 pm »
Check the sf::View class (tutorial, doc)

Moving the view half the window size in the top left direction would put 0, 0 in the middle of the screen.

6
Graphics / Re: How to move the View?
« on: June 20, 2020, 12:09:01 am »
sf::View view = window.getView();
view.move(0, 1);
window.setView(view);

Yes, you have to set the view when you modify it.

You don't need to modify the viewport to just move the view.
View creation and how they work:
https://www.sfml-dev.org/tutorials/2.5/graphics-view.php
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1View.php

7
Graphics / Re: How to move the View?
« on: June 19, 2020, 09:34:20 pm »
Get your sf::View as a variable, move it, and set it with setView

8
General discussions / Re: Multiple IntRects in a single Sprite
« on: June 15, 2020, 08:52:23 pm »
Yes, what Hapax said.

However if for some weird reason you want to draw everything with the same sprite, you can set the texture rect, draw, set a different texture rect, draw, etc.

9
Graphics / Re: sfml gradient shaders question
« on: May 29, 2020, 08:56:04 pm »
Hey. You can use an sf::RenderStates and pass it to your draw function instead of only the shader.

10
Quote
while (mWindow.pollEvent(event));
Don't put ; at the end of your while line.

11
General / Re: SFML dynamic / static
« on: May 06, 2020, 09:35:38 pm »
ca buggue
Oh  ???

Je ne sais plus la raison technique car je ne le fais jamais, mais il faut éviter  de déclarer en global les ressources SFML style Texture Window Text... sous peine de crash potentiel.

12
General / Re: Shape animations
« on: April 30, 2020, 05:52:42 pm »
Your gif is down.

13
General discussions / Re: Why is intersect too "basic?"
« on: April 30, 2020, 03:31:03 am »
It's only axis aligned bounding boxes (the square surrounding your object).
Not necessarily enough for what you want. Imagine playing pool but your balls collides as if they are squares.

14
DotNet / Re: How do I use pollEvent Method with C#
« on: April 24, 2020, 07:49:20 am »
Take a look at some of the examples, I think events are done through C# delegates.

15
Graphics / Re: Dimentionner le contenue dans une fenetre sfml
« on: April 21, 2020, 12:40:51 pm »
Ça s'appelle du letter boxing.
Il y a un petit tuto sur le wiki : https://github.com/SFML/SFML/wiki/Source:-Letterbox-effect-using-a-view

En gros, il faut que tu utilises une vue (si c'est pas déjà le cas) et que tu ajustes son Viewport (la partie de la fenêtre où s'affiche ta vue) de sorte à respecter le ratio que tu veux.

Pages: [1] 2 3 ... 56