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

Author Topic: Drag & drop  (Read 1427 times)

0 Members and 2 Guests are viewing this topic.

Ivelin

  • Newbie
  • *
  • Posts: 1
    • View Profile
Drag & drop
« on: January 31, 2021, 07:44:26 am »
I want to make drag and drop objects, draggable when holding on them with the mouse, also the screen is resized their size to be as well and the position to be in the correct place like it was so before resizing.

I've made it draggable and it does resize as it should: https://sourceb.in/nKxqkBzSbp, but there is a problem, after resizing the dragging doesn't work as it should. A guy told me that after resizing I need to apply a resize event on the view of the screen. Like that: https://sourceb.in/W66ROV0wFh. I added code on line 61, so it resizes itself, but now it's not being on the position it should when the window is resized.

Should I make code for that too or there is a better way ?


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Drag & drop
« Reply #1 on: February 01, 2021, 09:58:07 am »
Did you manage to solve it with the help on Discord?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/