Forums

OverviewV-Play 2 Support (Qt 5) › Scene scaleMode doesnt work

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #7732

    Vlad

    Got this log message when trying to set scaleMode in Scene

    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:444 (onSceneGameWindowChanged): qml: scaleMode is defined!
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:328 (calculateXScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:381 (calculateYScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:328 (calculateXScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:449 (onSceneGameWindowChanged): qml: Scene: onSceneGameWindowChanged: xScaleForScene( 0 ) is different than from GameWindow ( undefined )
    
    W/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:450 ((null)): qrc:///qml/VPlay/core/Scene.qml:450: Error: Cannot assign to non-existent property "xScaleForActiveScene"
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:328 (calculateXScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:381 (calculateYScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
     

     

    btw, any other way to scale scene to full device resolution?

     

    • This topic was modified 4 years, 1 month ago.
    • This topic was modified 4 years, 1 month ago.
    #7735

    Christian
    V-Play Team

    Hi Vlad,

    thanks for reporting that issue! The internal name for the zoomToBiggerSide scaleMode is currently “zoomEven” which has the same effect as “zoomToBiggerSide”, so please use that one until the release of the next V-Play update. After the next update, you can then also use “zoomToBiggerSide”.

    Cheers, Chris

    #7762

    Vlad

    can you tell me the rest of the changed scaleMode variants? It seems only letterbox still works

    Thanks

    #7763

    Christian
    V-Play Team

    Hi Vlad,

    sure: it’s letterbox, zoomEven (the new zoomToBiggerSide), zoomStretch (the new zoomNonUniform) and none.

    However, I would not recommend using anything else than letterbox. Why would you like to use a different scaleMode?

    Cheers, Chris

    #7765

    Vlad

    Hi Chris

     

    the idea is to get scene on device edges for several type of screens: 4:3, 16:9, 16:10

    #7767

    Christian
    V-Play Team

    Hi Vlad,

    yes that’s reasonable, zoomToBiggerSide is valid for that, but mention that your background may be cropped on some devices. You could also use letterbox and use scene.gameWindowAnchorItem to achieve using the whole screen. See our demos how this property is used.

    Cheers, Chris

    #7783

    Vlad

    Hi Chris

     

    Can you please post code sample?

    So far I cannot use whole screen

     

    thanks

    #7788

    Christian
    V-Play Team

    Hi Vlad,

    all our demos use the letterbox mode, so you can have a look there.

    Also have a look at examples folder (contentScale/gameWindowDefault subfolder). This is what it contains:

     

    GameWindow {
    
      Scene {
        id: scene
    
        // to use the whole space of the screen, use gameWindowAnchorItem
        Rectangle {
          color: "green"
          anchors.fill: scene.gameWindowAnchorItem
        }
    
        Rectangle {
          anchors.fill: parent
          color: "blue"
        }
      }
    }

    Cheers, Chris

     

    #7794

    Vlad

    Hi Chris

     

    thanks for code snippet

    but

    may be I’ve describe it incorrectly, but what I want is to get Scene using whole screen, w/o any borders.

     

    Is it possible?

     

    Thanks,

    Vlad

    #7797

    Christian
    V-Play Team

    Yes it is, with the gameWindowAnchorItem.

Viewing 10 posts - 1 through 10 (of 10 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support