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

Author Topic: Gve an sf::view a set size?  (Read 2242 times)

0 Members and 1 Guest are viewing this topic.

Stock

  • Newbie
  • *
  • Posts: 11
    • View Profile
Gve an sf::view a set size?
« on: May 30, 2014, 05:02:43 pm »
I was wondering if it is possible to set the size of a view and when the window is resized, the view does not change with it, I read through the API Doc and googled, and found nothing. I hope this was clear, thanks in advance.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Gve an sf::view a set size?
« Reply #1 on: May 30, 2014, 05:12:32 pm »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Stock

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Gve an sf::view a set size?
« Reply #2 on: May 30, 2014, 05:57:28 pm »
This actually does nothing...  or the same thing done by default. Which is the opposite of what I wanted, I want it to not scale itself.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Gve an sf::view a set size?
« Reply #3 on: May 30, 2014, 07:54:29 pm »
This is exactly what it does. If you read what's written above the code, it's pretty clear that it's not the same as the default behaviour (what would be the point of showing a piece of code that does what SFML already does automatically?).
Laurent Gomila - SFML developer

Stock

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Gve an sf::view a set size?
« Reply #4 on: May 30, 2014, 11:53:59 pm »
I apologize, I made an error when implementing it. The title "Showing more when the window is resized" also threw me off a bit. I got it now though thank you.

Stock

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Gve an sf::view a set size?
« Reply #5 on: May 30, 2014, 11:57:34 pm »
Instead of starting a new thread, this is semi related. Is it possible to have more than one view, or a more specific example, a background covering the whole window then a view which is the map, then a view to the side of the map, which would serve as an inventory section?

Simply put:
    Can I have more than one view active at a time?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Gve an sf::view a set size?
« Reply #6 on: May 30, 2014, 11:59:06 pm »
Simply put: there is a tutorial about views.

Stock

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Gve an sf::view a set size?
« Reply #7 on: May 31, 2014, 12:50:03 am »
I have been nothing but kind here; however, it seems that this community is full of anti-productive jerks. I try to explain problems clearly, I did some searching first, but communities are there for reasons, to help. The help section is there for a reason, to help. Pawing through all of the API documentation takes much longer than simply asking for help. In the help sections, you know, what they are for.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Gve an sf::view a set size?
« Reply #8 on: May 31, 2014, 01:20:42 am »
Yes but the answer is in the official tutorial linked by zsbzsb and it shows how to use multiple views. There even is a minimap example.
The doc also shows in its detailed description and code how to use multiple views at the same time.
If you read the tutorial and have trouble understanding something, you can take a look at this other tutorial on the wiki or ask question.

I don't think it's unrealistic to ask people to read the doc or tutorial of the class they want to use when they have a question which is already answered in both. The SFML team wrote tutorials and documentation but you don't want to read them (the description in the doc is barely 10 lines of text, 10 lines of code), doesn't that make you the anti-productive jerk?