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 - LightCancel

Pages: [1]
1
Thanks. I'm kinda beside myself with how little I know, but I'm learning. Thanks a ton!

2
draw is indeed a virtual func, but the problem I'm encountering it that the draw function must be const, and something about that seems to dissallow me from accessing map entires with the square-brackets.

MapAct["Entry"];

I get this error.

error C2678: binary '[' : no operator found which takes a left-hand operand of type 'const std::map<std::string,ActorC *,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' (or there is no acceptable conversion)

3
Using the example from the vertex tutorial I made an object that can be draw. Right now I'm trying to make another object (here now called multi-object) that inherits from the initial object (here now called single-object)with its key feature being that it contains within it a map of pointers to other objects of the first variaty. So I try to overload to the draw function of multi-object but I run into the trouble that I can't iterate through the map to call draw on each one. Does anyone have any solutions.

To repeat:
-I have a single-object class modled after the myentity class from the vertext tutorial.
-I am making a multi-object class that inherits from single-object and contains a map of single objects.
-Trying to overload the draw func from single-object to draw every object within the map while still being able to be called like single-objects (window.draw(object), and failing horribly. Help, please!

4
Thanks to everyone who responded! I now have the desired results!

5
Use another (static) view for your GUI, as explained in the tutorial for example.

Are you referring to this tutorial? http://sfml-dev.org/tutorials/2.1/graphics-vertex-array.php

6
It's easy enough to draw to the world, so to speak, but for UI elements is there a way to call draw so that it's drawn relative to your screen so that when you move the view, the UI elements stay in place because they darw to the screen, not the world.

Pages: [1]
anything