creator_to_cocos2dx icon indicating copy to clipboard operation
creator_to_cocos2dx copied to clipboard

Widget support is missing

Open TankTheFrank opened this issue 7 years ago • 5 comments

The readme says that widget is supported with AlignOnce but there is no widget component support whatsoever.

I don't know if it ended in the readme without being added at all or was lost along the way, in any case I'll open a pull request once I finish implementing basic widget AlignOnce for my own project.

Without any alignment the fixed width/fixed height mode cannot work making the whole project fairly pointless.

TankTheFrank avatar Dec 11 '17 15:12 TankTheFrank

It already support AlignOnce. The coordinate output by Creator already do the alignment.

minggo avatar Dec 12 '17 02:12 minggo

AlignOnce doesn't exist in this plugin. How can it be supported if it's missing? Whatever you mean by "AlignOnce" is not what it is in Cocos Creator. Here is the tooltip with what AlignOnce means in case you missed it.

Just in case is too long to read, skip to the at runtime part.

align_once

Anyway, I've implemented it for my own use so do whatever you want with the "official" branch.

TankTheFrank avatar Dec 12 '17 12:12 TankTheFrank

You are free to send a PR to support it, but i don't quite understand the issue. Could you please show me the wrong effect? It is better if there is a Creator project to reproduce it.

Thanks.

minggo avatar Dec 13 '17 01:12 minggo

Hi, I've also encountered widget alignment issues when i exported out my project, my ui elements that is using widget for alignment based on pinned %/px will still end up getting crop out on different aspect ratio devices; Running Cocos simulator will show that its aligned but not after exported out;

After digging into the parser scripts; I do not see the support of cc.widget component anywhere; There wasn't any remote parsing of widget data anywhere;

I do believe what @TankTheFrank says is true that widget alignment is still not supported;

jusforfun avatar Mar 20 '18 03:03 jusforfun

@tankorsmash @jusforfun I add a PR for the Widget support, see #160 , I will appreciate it if you would like to review and have a test.

Due to the Creator Widget Component is quite different from Cocos2d-x Widget class, So the support can't be perfect, please read that comments in PR firstly before you review.

drelaptop avatar Apr 03 '18 09:04 drelaptop