setPosition() and setPositionInPixels()

setPosition() and setPositionInPixels()
0.0 0


So when developing on iOS, I believe that cocos2d-x means that setPosition uses ‘points’, which get scaled by the resolution, so for instance if you to sprite~~>setPosition on resolution 480x320 it would be 50 pixels from left, and 50 pixel from bottom, but the same command on retina display resolution 960x640 the same sprite would be 100 pixels from left, and 100 pixels from bottom, which would maintain the same relative position across all resolutions…this is great! After all, we have setPositionInPixels if we want to position it by actual pixels.
So my question is, how can I make this work on my win32 build? It seems that using setPosition makes my sprite appear at 50 pixels x 50 pixels no matter what my resolution is. I’m changing my resolution in AppDelegate with pMainWnd~~>Create. Maybe I’m missing something?


Ok, I think I may have actually solved part of the problem…

Apparently on win32 I can also do the following:


Which then makes my app look the same on both retina and standard. However, what if on win32 I want to set my resolution to something custom? Do I need to define my own scale variable based on ‘actual_width / 320’ and scale all of my setPosition() commands manually or is there a better way?

Can I just call setContentScaleFactor(newScale) using a custom scale factor, such as 2.3f ?