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

Author Topic: Simple multimedia aplication: some guidance needed  (Read 2151 times)

0 Members and 1 Guest are viewing this topic.

Juan

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Simple multimedia aplication: some guidance needed
« on: September 07, 2012, 05:56:48 pm »
Hi  :).
I decided (for no disernible reason  8) ) to make a simple multimedia application, SFML looks like the tool I need but i need some help because i have never work with GUI (I'm a java programmer for web apps). I know it sounds like the classic noob waiting his problems solved by someone else, but I have NO idea for where start. I decided to use wxWidgets and complete some tutorials even compiled the Wiki example to integrate SFML and wxWidgets and I'm stucked  :-\ I don't know what to do next, I googled, and searched in this forum I just need a little help to know where to start. Thanks

What I want is to make a simple program that open a bitmap file choosen by the user (File Dialog) and the user would be able to drag the image to any position.
Should I load and draw the image in a SFML canvas?
How i can make a "working area" of variable size on the fly?

Thanks in advance.   ;D

P.D.  I'm not a native speaker so I'm sorry if I'm dificult to understand.  :-[

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11046
    • View Profile
    • development blog
    • Email
Re: Simple multimedia aplication: some guidance needed
« Reply #1 on: September 07, 2012, 06:09:29 pm »
I decided to use wxWidgets and complete some tutorials even compiled the Wiki example to integrate SFML and wxWidgets and I'm stucked  :-\ I don't know what to do next,
Well that doesn't really help us, so we could help you. What doesn't work, where are you stuck? Does the code work? Is it just your reasoning behind that doesn't work? You need to give us more information otherwise we can't really help with your problem. ;)

What I want is to make a simple program that open a bitmap file choosen by the user (File Dialog) and the user would be able to drag the image to any position.
Should I load and draw the image in a SFML canvas?
I'm not familiar with wxwidget so I can't help you there, but usually a file dialog returns a path, then you could use that path to load the image with SFML and then draw it.
I guess wxwidget has also their own image widget or something like that, so you could also use that.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Juan

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Simple multimedia aplication: some guidance needed
« Reply #2 on: September 07, 2012, 11:52:15 pm »
Wow thanks for the quick reply  ;D.
I have a simple program  (based on the tutorial) that opens a window with a menu bar, the menu bar has the 'open' option  it opens a dialog to choose an image file, the program open it and draw it in a SFML RenderWindow. The code seems to work fine, but now i don't know how to add scroll bars for example (if i open a large image i can only see a portion of it or draws it scaled) I have searched but it is very specific for SFML, I have tryed also with this code (compiles well but crashes when I run it).
Any coment or idea is welcome.
Thanks.

You can see my project here.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11046
    • View Profile
    • development blog
    • Email
Re: Simple multimedia aplication: some guidance needed
« Reply #3 on: September 08, 2012, 02:07:57 am »
Like I said, I've no idea how wxWidget works (have only used Qt in the past), but wouldn't it be possible to simply have a scrollbar that has some number representing the current slider position and then you could move the sf::View accordingly?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Juan

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Simple multimedia aplication: some guidance needed
« Reply #4 on: September 10, 2012, 06:19:43 pm »
Hi.

Quote
wouldn't it be possible to simply have a scrollbar that has some number representing the current slider position and then you could move the sf::View accordingly?

Yep maybe, thats the problem I don't know, it seems that nobody knows, I had the hope that someone here had worked with xwWidgets + SFML before  :-\ . Should I try Qt instead?

I will try a diferent way to get it working  ;)
Thank you very much  ;D

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11046
    • View Profile
    • development blog
    • Email
Re: Simple multimedia aplication: some guidance needed
« Reply #5 on: September 11, 2012, 01:35:41 am »
Well if you have problems with understanding what other libraries than SFMLcan do, then you shouldn't ask in the SFML forum. :P
Most of the people here are creating games and not GUI applications and if some GUI is needed in game it won't be Qt or wxwidget, but SFGUI or similar. ;)

Qt is imho one of the best GUI frameworks but I guess your task can be done with any of them, you just need to read their documentation rather than SFML's ones and after you have everything set, you can ask more specific SFML  question.s. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/