Cocos Studio 2 Feedback

Maybe his code relies on namespace scopes utilizing using.

You have to use:

#include <ui/UIWidget.h>

and the full namespace: ui::Widget::TouchEventType

If you want to copy&paste his code, you have to scope the root namespace: using namespace ui.
After that, you can use Widget::TouchEventType.

Yes, I for some reason was trying to do cocos2d::ui::Widget which I thought would work.

Consider:

.h

void menuStartCallback(Ref* pSender, cocos2d::ui::Widget::TouchEventType type);

.cpp

using namespace ui;
....
void HelloWorld::menuStartCallback(Ref* pSender, Widget::TouchEventType type)
{
    switch (type)
    {
        case Widget::TouchEventType::BEGAN:
            std::cout << "pressed the start button" << std::endl;
            auto director = Director::getInstance();
            director->replaceScene(GameScene::createScene());
            break;
            
        case Widget::TouchEventType::ENDED:
            
            break;
            
        default:
            break;
    }
}

I’m getting an incomplete type in the header

I’ve encountered a bug:

I had manually installed ant, adt-bundle, etc manually, and was using cocos console just fine.

Then I installed CocoStudio2, tried it out and decided to uninstall for the moment, and now cocos-console won’t work anymoe.

I’ve tried re-setting up everything, but I keep on getting errors.

For example, if I try todo a cocos compile -p web -m release, I get the following:

Running command: compile
Building mode: release
running: 'C:\ant\bin\ant -f E:\eclipseworkspaces\cocosws\Titos\publish\html5\bui
ld.xml'

Buildfile: E:\eclipseworkspaces\cocosws\Titos\publish\html5\build.xml

BUILD FAILED
E:\eclipseworkspaces\cocosws\Titos\publish\html5\build.xml:5: java.lang.Unsuppor
tedClassVersionError: com/google/javascript/jscomp/ant/CompileTask : Unsupported
 major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoade
r.java:1128)
        at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader
.java:1299)
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoa
der.java:1354)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:131
5)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:106
8)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:249)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:579)

        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:237)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
179)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:93)
        at org.apache.tools.ant.Main.runBuild(Main.java:826)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds
Error running command, return code: 1

Any clues?

add this in header file

#include “cocostudio/CocoStudio.h”

Thanks for your advice, but I didn’t mean CocosStudio but CocosBuilder…

Is armature going to be supported in the feature?
I have some objects that extends Armature…so CocoStudio 2 working with Node*… Do i need to move from armature to animated node in cocostudio 2?

Thnx…

is OS X 10.8.4 supported?
Displays “Failed To Init GameWindow” error when trying to open a scene.

I’m experiencing a possible bug with Cocos Studio: When I try to publish my Cocos Studio scenes and contents to Xcode…nothing happens. No errors, no hang up. It opens Xcode, creates the project, but it doesn’t publish any of the content I’ve designed in Cocos Studio. Is somebody experiencing the same issue? (Or does somebody know why this is happening to me?)
Thx guys.

PS_ I use Cocos Studio 2.02 and Cocos 2d-x 3.3 + xcode 6.1

How can I achieve flexible size of root node(Panel) in cocostudio 2.0.2, like Adaptive Resoultion in cocostudio 1.6?

and I could not find ListView

I can’t use Relative percentage of parent container :frowning:

I want to use relative position and size, too.

1 Like

I saw ‘Custom Class’ field in V2.0.5 , that very helpful for me . i think if have ‘Custom Fields’ feature even better .

thanks for the great work…

so I have an issue and I wonder - am I the only one with this issue -> when I add an armature created with cocostudio into my scene, it looks fine as long as content scale factor is == 1

once content scale factor changes (especially on android where there are very many screen sizes so scale factor wont be just 1 or 2 or 1.5) the armature looks like its exploded or broken up - but if you do something like this:

armature->setScale(1.6);

it works perfectly, its only when it is scaled via the global contentScaleFactor that it looks broken up, almost as if the images of the armature are no longer scaled, or only distance between the sprites that make up the armature are scaled.

after doing some research I see this in the code for Director:

…To achieve this, we need to ignore ‘contentScaleFactor’ in ‘AtlasNode’ and ‘LabelAtlas’. So I added a new method called ‘setIgnoreContentScaleFactor’ for ‘AtlasNode’, …

so I propose two solutions:

  1. find a way to apply a “setIgnoreContentScaleFactor” to the whole armature and its children - and then let developer apply scale to armature manually, because that works
  2. make sure all sprites of armature are scaled according to contentScaleFactor - and let developer ensure that scaling is done downwards so that it does not look pixelated in the end, i.e let developer be responsible for scaling from big size -> smaller size

see here for another user with the same issue

You guys have completely confused me with this editor.
There were multiple versions released in a last few months which had no real backward compatibility.
At this moment v2.0.5 is available for downloading which is declared as stable version, not beta.
But no armature animation can be found, no animations list is available, no animation curves and other features that were available earlier.
The samples contain some strange nodes which are not available in ‘Controls Browser’ (Layer File node or CSD-file node).
Moreover there are the different versions of documentation which always contains only partial and obsolete information and different versions of home pages.
Unfortunatelly the pro-developers (not beginners) really can not rely on CocosStudio because all of these.
At this moment your primary goal should be getting rid of this mess in “naming, versioning and placement of your software”.

1 Like

[v2.0.5][Cocos2d-x 3.3]
I can’t use Relative percentage of parent container

(sorry, I know this is the wrong place to ask, but I get an error (403 Forbidden) when I try to create a new topic)

help plz, I can’t create a new project (get an error message) from the command line.

I have been trying to create a new c++ project, for 2 days now.

First I open the CMD.
Then I go to the cocos2d-x folder.
Then I enter this line:

cocos.py new Title -p com.companyname.Title -1 cpp

this gives me an error, saying :

cocos new: error: argument -1/–language is required

don’t know why this is happens.

I have the “Microsoft Visual Studio Community 2013” installed.
Python 2.7 is installed.
I have run the setup.py file, got all the right paths working.
Finally I tried to run the ’ cocos2d-win32.vc2012.sln ’ file from VS-2013 and all worked as it should.

I still get the error.

I’m using Windows 8.1

Any help will be appreciated, thanks in advance.

@ziegler It should be l (lowercase L) for language not the number 1:
cocos new Title -p com.companyname.Title -l cpp

Hope that helps.

OMG, thank you.
that was the problem, I feel so stupid now.

I’m happy that I got help to solve this problem, if I didn’t, I would had dropped this engine all together.

thank you again.

Only #include "ui/UIWidget.h" is needed, as it declares cocos2d::ui::Widget. include "cocostudio/CocoStudio.h" will include a lot of headers(including ui/UIWidget.h), which are not needed and just adds bloat.

Hi, I have some feedback for Cocos Studio 2 Mac

  • because of strong file cache, editing from other editor .csd file is not reflected the change.
  • although delete a file from finder, the reference in Cocos Studio does not work well.
  • need more keyboard shortcut
    • in Animation Frame Navigation
      • add frame, delete frame
      • display on/off
    • properties
      • sprite disable, enable
  • label properties are few
  • creating new file, after typing file name, then choose Layer/Node, then the file name will be deleted
  • turn on automatic frame recording as default flag in setting
  • in new Layer, although the layer background color is truely transparent, but the it displays black
  • change it white and gray backgrond like photoshop
  • in publish, no need all files as .csb . what i need is updated .csd files publish. it’ll be more fast publish
  • keep the position when a node/layer is moved from other level in Animation window
  • need easy rename
  • can set animation play speed as debug
  • can read when the node/layer is locked (unwritable is good, but no need to be unreadable element)
  • click proper blue line and proper selection in Animation window
  • can set FiniteTimeAction like MoveTo, JumpTo, also Easing
  • font files sometimes cannot read in .csd file
2 Likes