Work with layout. HOW?

  • webkuk
    Likes 1

    Problem Description

    How do responsive scene with Cocos Studio and use it in js code?
    For example i need do red panel with height 10% of screen and pin it at the top of screen.

    I`ll try use scene from Cocos Studio in my code:

    scene = ccs.load("res/test.json").node;

    this.addChild(scene);

    But i see only sprites without ui panels.

     

  • Sonar Systems admin
    Likes 0

    Could you send us screenshots of your project in Cocos Studio

  • webkuk
    Likes 0

    i found bug in Cocos Studion 2.1.5 . Studio wrong exported json file with panel. Always do for panel

                "FirstColor": {

                  "G": 150,

                  "B": 230

                }
    and use it for fill panel


  • Sonar Systems admin
    Likes 0

    ???????????

  • webkuk
    Likes 0

    can create in Cocos Studio scene with any panel and export into json and send me?

  • Sonar Systems admin
    Likes 0

    Don’t understand your question, exactly what are you trying to achieve.

  • webkuk
    Likes 0

    I want to develop a game using Cocos Studio. 

    https://drive.google.com/file/d/0B4S6wwcC-ZSUenhRdDI2SHN6ME0/view

    How can i do this template in Cocos Studio and export this in my cocos2d js project?

     

  • Sonar Systems admin
    Likes 0

    We will be creating a tutorial on this very soon, stay tuned to the page below for updates on our Cocos Studio tutorials.

     

    http://www.sonarlearning.co.uk/questions.php?question-topic=40

  • webkuk
    Likes 0

    ok, but what about bug with panel?

  • webkuk
    Likes 0

    i am genereated new project in cocos studio and export to cocos code ide, look dffirence studio project and execution result from cocos code
    https://drive.google.com/file/d/0B4S6wwcC-ZSULVBNclc0OXk5MHc/view

  • Sonar Systems admin
    Likes 0

    What’s the bug with the panel, could you send us a screenshot.

  • webkuk
    Likes 0

    u see my test project?

    this screen from it https://drive.google.com/file/d/0B4S6wwcC-ZSUbEZGRXV5NVlFMzg/view

  • Sonar Systems admin
    Likes 0

    I can see it, is the issue the colour?

  • webkuk
    Likes 0

    yes, problem with panel color after export in json file

  • Sonar Systems admin
    Likes 0

    OK, that is weird, could you send us a screenshot of the panel properties.

  • Sonar Systems admin
    Likes 0

    How are you publishing it from Cocos Studio?

  • webkuk
    Likes 0

    with button in top left corner of screen (near button “Package Project”)


  • Sonar Systems admin
    Likes 0

    OK, that is the right way. Have you tried setting a background image just to see if it works when you run it?

  • webkuk
    Likes 0

    I run it with background image, but color don`t change. Have you everything working correctly?

  • Sonar Systems admin
    Likes 0

    Does the image appear though?

  • webkuk
    Likes 0

    yes i see image in cocos simulator

  • Sonar Systems admin
    Likes 0

    ok, so its only the colour that is not working. Have you tried adding another Object onto the canvas and changing that objects colour to see if that works. This is so we can identify if its a generic object colour issue or a panel issue.

  • webkuk
    Likes 0

    hmm, i tried add pageview and scrollview and change their default colors, but in cocos simulator i see all objects with their default colors from cocos studio


  • Sonar Systems admin
    Likes 0

    Try another object that isn’t a container and see if you can successfully change the colour.

  • webkuk
    Likes 0

    label color work and color tint work too

Login to reply