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

Author Topic: How do I shift background to grayscale?  (Read 11762 times)

0 Members and 2 Guests are viewing this topic.

bszandras

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Sprite under PNG
« Reply #15 on: May 03, 2020, 03:09:25 pm »
Is there a way to check if a sprite is under the transparent part of another sprite (with a png)?

Riton_Lafouine

  • Newbie
  • *
  • Posts: 16
    • View Profile
accès à la touche + (shift =)
« Reply #16 on: May 03, 2020, 04:35:03 pm »
Bonjour,

tout d'abord, je suis débutant sur SFML (et en programmation en général) mais j'ai bien réussi à mettre en place une chaine d’événement clavier fonctionnelle dont je suis satisfait.

Mon problème est que je cherche à accéder à la touche + (shift =) le code ascii est identique à celui de la touche + du pavé numérique mais apparement SFML n'utilise pas ce code ascii pour accéder aux touches.

En effet mon programme ne répond pas à + (shift =) alors qu'il répond à + clavier numérique.

Comment puis-je accéder à cette touche, elle n'apparait pas dans sf::Keyboard Class Reference

question subsidiaire, est il possible de forcer le shift pour qu'il soit activé tout le temps dans le programme ?

Merci d'avance

RLF

Riton_Lafouine

  • Newbie
  • *
  • Posts: 16
    • View Profile
Retrieving + key with (shit =)
« Reply #17 on: May 03, 2020, 04:56:21 pm »
Hello, i'm new to sfml and rookie into programming.

I already set up a keyboard event chain wich is working and i'm happy with it.

But i need for some purpose to use the + (shit =), it shows Ascii code 43, same as + key on numerical keypad.

+ (shift =) is not triggering my event, it seems sf::keyboard::Add is only triggered by keypad.

Is there a way to use this key wit sf::keyboard ?

Bonus question, is it possible to lock Shift key in the program ? in order that keyboard numbers (not keypad) are always active in front.

thanks by advance,

RLF


nullptr123

  • Newbie
  • *
  • Posts: 0
    • View Profile
Texture smoothing, window stretch, white/grey pixels
« Reply #18 on: May 03, 2020, 09:45:18 pm »
Is there a technical explanation for why some textures might have these artifacts when stretching with texture smoothing? Is there something I can do to the "faulty" textures to help them along and remedy this? Stretching the window with smoothing enabled is quite desirable for me here, so I'd like to do something other than just turning smoothing off.

https://i.imgur.com/Tss2AGa.png

If it can look fine for some textures then surely there's a way to get it to look good for all of them.

nullptr123

  • Newbie
  • *
  • Posts: 0
    • View Profile
Texture smoothing, window stretch, white/grey pixels
« Reply #19 on: May 03, 2020, 09:46:12 pm »
Is there a technical explanation for why some textures might have these artifacts when stretching with texture smoothing? Is there something I can do to the "faulty" textures to help them along and remedy this? Stretching the window with smoothing enabled is quite desirable for me here, so I'd like to do something other than just turning smoothing off.

https://i.imgur.com/Tss2AGa.png

If it can look fine for some textures then surely there's a way to get it to look good for all of them.

bszandras

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Sprite under Sprite
« Reply #20 on: May 04, 2020, 08:13:01 am »
I want to check if a sprite is under another sprite's transparent part (textured with a png). I haven't really found a solution, is this even possible in SFML?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Forum database errors
« Reply #21 on: May 04, 2020, 08:29:41 am »
Hi

It seems that the forum causes database errors when creating a new post, or doing a search.

We're aware of these errors, we're investigating and hopefully we'll fix that soon.

In the meantime, you can stop sending me PMs or e-mails about it ;D
Laurent Gomila - SFML developer

 

anything