Coder Social home page Coder Social logo

fairygui / fairygui-cocos2dx Goto Github PK

View Code? Open in Web Editor NEW
470.0 26.0 107.0 21.32 MB

A flexible UI framework for Cocos2d-x

Home Page: https://www.fairygui.com

License: MIT License

C++ 98.98% Objective-C 0.04% Makefile 0.29% C 0.64% CMake 0.04%
cocos2dx cocos2d cocos-creator cpp-gui cross-platform-gui infinite-lists virtual-list

fairygui-cocos2dx's People

Contributors

cze2014 avatar elmerning avatar haizhih avatar halx99 avatar hanyu363 avatar umair6 avatar wxyu247 avatar xiaoguzhu avatar yangc999 avatar zeas2 avatar zhongfq avatar zhugefeia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fairygui-cocos2dx's Issues

应该提供一个通用的C++层,在此基础上在接入cocos2D-x binding.

现在这个C++版本依赖于cocos2d-x编译,如果不依赖于cocos2d-x就没法用了。

而大部分游戏引擎底层都是C++开发的,界面库的通行做法是把输入,batch提交等代码抽象成一个虚基类,对于每个引擎,例如cocos2dX,CryEngine,UE4的RHI,OGRE,Urho3D 等,都各自写一个这个类的实现。更应该写一个独立的OGL,和DX实现各写一个。

其他语言:C#和lua可以生成相应的binding,JavaScript可以用Emscripten过的C++,你们的核心代码只用写他一遍,这样解耦以后便于维护,只需要维护核心代码就行了。

其他UI库:什么CEGUI,MyGUI,还有现在非常流行的dear ImGUI,都是这样做的。

期待你们的新版本。

Particle Editor

Hi, I noticed there is no particle editor in fairyeditor. CococsStudio and Creator have particle node.

cmake配置出错

master分支
FairyGUI-cocos2dx/libfairygui/CMakeLists.txt:167 (add_library):
Cannot find source file:

Classes/treeview/TreeNode.cpp

Classes/treeview/TreeView.cpp

CMakeLists.txt好像没有随项目一起更新啊
我是在cocos2d的cmakelists.txt内添加命令生成工程的,这样打开cocos2d就有这个子项目了
add_subdirectory(/mypath/FairyGUI-cocos2dx/libfairygui ${ENGINE_BINARY_PATH}/FairyGUI)

循环列表急停

image
循环列表
滚动时会瞬间停止,而且每次都停在第二章那张图片上,说明计算位置时出现了bug

Safe base for a port?

Is this a safe base to use for porting over to create a C++ FairyGUI backend for something other than Cocos2d? Urho3D in particular.

cocos2dx-3.17无法编译android

Creating configuration releaseAnnotationProcessor
Creating configuration releaseJackPlugin
Creating configuration testReleaseCompile
Creating configuration testReleasePublish
Creating configuration testReleaseProvided
Creating configuration testReleaseWearApp
Creating configuration testReleaseAnnotationProcessor
Creating configuration testReleaseJackPlugin
Parsing the SDK, no caching allowed
SDK initialized in 0 ms

FAILURE: Build failed with an exception.

  • Where:
    Build file 'D:\FairyGUI\FairyGUI-cocos2dx\Examples\cocos2d\cocos\platform\android\libcocos2dx\build.gradle' line: 29

  • What went wrong:
    A problem occurred evaluating project ':libcocos2dx'.

Could not find method implementation() for arguments [directory '../java/libs'] on object of type org.gradle.api.inter
nal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 1.386 secs
Stopped 0 worker daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareE
xception: Build file 'D:\FairyGUI\FairyGUI-cocos2dx\Examples\cocos2d\cocos\platform\android\libcocos2dx\build.gradle' li
ne: 29
A problem occurred evaluating project ':libcocos2dx'.] from daemon DaemonInfo{pid=14876, address=[e4b412c5-fabc-4b8d-913
a-9da9f8f56614 port:64927, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1534788528489, context=Defaul
tDaemonContext[uid=5ec23d19-cee4-4a26-ad8e-bcbd0d7bae39,javaHome=C:\Program Files\Java\jdk1.8.0_91,daemonRegistryDir=C:
Users\NothiX.gradle\daemon,pid=14876,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryErr
or,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
执行命令出错,返回值:1。

关于Cocos版本的建议

建议所有节点都继承ccNode,使之可以与cocos原生系统混用,因为有些定制化的3D特效和模型特性在目前版本没看到可以怎么加入其中。

听说会用于 Creator,建议暂缓实现渲染部分

Creator 的 H5 渲染层预计在 1.7 - 1.8 能完成重写,到时会有新的 API,最好等重写后再实现渲染部分以免无法升级到最新版。(除非你们基于 Creator 的现有 UI 组件实现,那样就没兼容性问题)
原生平台渲染层重写时间待定。

用“自定义遮罩”对图片进行裁剪,在安卓上不生效

尝试使用cocos原生的ClippingNode进行图片裁剪,是不会有问题的。
fgui里面的FUIContainer其实是拿了ClippingNode的代码过来再进行改动封装,对两者进行了比较,可能出问题的地方两者都没区别,但fgui的裁剪确实在安卓版上不生效(IOS还未测试。)。

另外,屏蔽了FUIContainer里面的n->setGLProgram(p); 在安卓版上就能正常出现裁剪效果了,但这样改绝壁是错的=。=! 找不到问题在哪,所以麻烦大大有空可以看看……

图片渲染问题--边缘多出多余的黑色像素

image

同一张png图片,用cocos自带的创建sprite的接口渲染出来边缘就没有问题,
请问这是我在编辑器哪里设置的不对么,我就是把图片直接拖到编辑器里面使用,没有做其他的额外设置。

mac 模拟器编译失败

平台:macos
环境:xcode9+
操作:编译example在模拟器iphone8plus下失败,提示找不到openglxxxxx

动效

动效能不能逆转播放?

label的get_title问题

label的getText,直接返回了_title,使用设置方法调用没有问题,但是如果是输入label手动输入的内容就get不到值。
建议重载getTitle,gettext的时候返回getTitle。
const std::string& GLabel::getTitle() const
{
if (_titleObject != nullptr)
return _titleObject->getText();
return _title;
}

自定义ttf字体无效?

在GUI编辑器里配置好字体后,并将字体设置为导出。但是实际显示效果上字体没有变化。

UIConfig::registerFont(UIConfig::defaultFont, "fonts/DroidSansFallback.ttf");

这一句修改成我的字体后(英文数字字体),所有中文全部变特殊符号了。但是英文字体还是没应用上。

COCOS2d-x 3.17.2

cocos版本不能共享package里面的资源

如题,cocos版本不能共享所有package里面的资源,之前使用laya的sdk是支持这个功能的,不知道能否也支持下cocos2dx,资源共享只能放到一个包里面。

GImage 边缘显示有问题

dadfadfzcxv2131

cocos版本是3.17.1

左边的是直接创建的sprite

auto testSprite = cocos2d::CCSprite::create("button-normal.png");
this->addChild(testSprite);
testSprite->setPosition(300, 300);
testSprite->setCenterRect(Rect(20,9,14,9));
testSprite->setContentSize(Size(150, 200));

右边是UI里的GImage

cocos2dx 3.x test failed

i got error: "base/CCStencilStateManager.h' file not found" when i use cocos2dx 3.10, but README.md said :" 请下载3.x版本cocos2dx命名成cocos2d放在Example根目录".

and then i try cocos2dx 3.16,i got another error: "tinyxml2/tinyxml2.h file not found".
please tell me worked cocos2dx version and fix README.md.

整体修改

尝试使用控制器把全部组图整体一起添加动画控制颜色和大小。
找不到能把全部的图片组了一起调整深度和一起改变大小。每张图之间的距离都不一样需要保持之间的距离不能更改。水平布局和垂直布局做不到我要的。

group

文本描边颜色不正确

文本如果设置成黑色,描边无论设置成什么颜色,都是黑色的效果
而文本若设置成白色,则描边颜色显示正常

UIPackage析构函数未被调用过

在运行Demo时,UIPackage和PackageItem两个类的析构函数从未被调用过,这是否是一个bug?或者说需要客户程序去显示调用UIPackage类的析构函数?

Loader加载图片九宫格无效

如题,编辑器中正常,cocos里就失效了
使用Image控件则九宫格效果正常显示,唯独使用Loader加载图片,九宫格就无效

Program Crashes when closing while scene Fade transitioning

So as the title says, the program crashes if you try to close the application while a TransitionFade is happening.

To replicate this is quite ease:

On the Example project ->

MenuScene.cpp -> continueInit()

Just change the transition time to a larger value i.e 1.5 for the first child (button that navigates to BasicScene)

image

Then when transitioning to Basic Scene close the application

crash-fairy

GProgressBar.tweenValue bug

短时间内连续调用 GProgressBar::tweenValue 会出现进度条跳动。
初步debug 确定是tweener返回的oldValue值为0造成的

    if (_tweening)
    {
        GTweener* twener = GTween::getTween(this, TweenPropType::Progress);
        oldValule = twener->value.d;
        twener->kill(false);
    }

目前还没找到为啥Tween为啥会返回0,请大家看看如何解决

输入框没有被上层UI覆盖

如题,输入框的输入没有被上层UI覆盖,导致在上层点击图片的时候会把下层的输入框弹出来。

issue in examples with cocos2d-x-3.17

Hi, i manage to compile and run 'FairyGUI' examples but when i hit the second button from left my debugger in visual studio 2015 says :
Exception thrown: read access violation.
this->_configuration was 0x42480000.
The problem is in "int FontFNT::getOriginalFontSize()const" in CCFontFnt.cpp file.
Is something i can do about that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.