Giter Site home page Giter Site logo

longhuu100 / fairygui-cocos2dx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fairygui/fairygui-cocos2dx

0.0 1.0 0.0 21.3 MB

A flexible UI framework for Cocos2d-x

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

License: MIT License

C++ 98.98% C 0.64% Objective-C 0.04% Makefile 0.29% CMake 0.04%

fairygui-cocos2dx's Introduction

FairyGUI Cocos2dx SDK

A flexible UI framework for Cocos2dx, working with the FREE professional Game UI Editor: FairyGUI Editor.
Download the editor from here: www.fairygui.com

FairyGUI编辑器操作简单,使用习惯与Adobe系列软件保持一致,策划和美术设计师可以轻松上手。在编辑器即可组合各种复杂UI组件,以及为UI设计动画效果,无需编写任何代码。可一键导出到Unity,Cocos2dx, Starling, Egret, LayaAir, Pixi, Haxe, Flash等多个主流应用和游戏平台。

下载UI编辑器:www.fairygui.com

Get Started

目录结构:

  • libfairygui 这里是fairygui库的源码。
  • Examples 这里是示例的源码。
    • UIProject 这里是示例用到的UI界面的源码,使用FairyGUI编辑器打开。

cocos2dx源码需要改动一处地方才能通过编译,打开2d/CCLabel.h,大约在672行,为updateBMFontScale函数打上virtual修饰符。即

  virtual void updateBMFontScale();

因为这个方法里有强制字体对象指针为FontFnt类型的代码,但我们不使用FontFnt(FontFnt只支持从外部文件中载入配置,更糟糕的是BMFontConfiguration是定义在cpp里的。), 所以需要重写这个方法。

使用Examples/proj.platform文件下的工程文件

请下载3.x版本cocos2dx命名成cocos2d放在Example根目录。

使用cocos2dx的cmake生成工程

在cocos2dx的CMakeLists.txt文件末尾添加:

add_subdirectory(/youpath/FairyGUI-cocos2dx/libfairygui ${ENGINE_BINARY_PATH}/FairyGUI)
add_subdirectory(/youpath/FairyGUI-cocos2dx/Examples ${ENGINE_BINARY_PATH}/FairyGUI_Examples)

生成的可执行文件在bin/FairyGUI_Examples目录,需要自己复制Examples/Resources目录过去,windows还要复制依赖库(可以从cocos2dx生成的cpp-test目录复制dll)

Learn

Xem thêm doc cocos2dx

License

MIT

fairygui-cocos2dx's People

Contributors

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

Watchers

James Cloos avatar

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.