Commit Graph

3818 Commits

Author SHA1 Message Date
gestern 085ae2603f Fix several bugs with button's title (#19073)
* Fix several bugs with button's title:
(a)when using setTitleLabel() the button didn't resolve the corresponded parameters;
(b)bug with measurement accuracy (ignores the fractional part) of the system font and ttf-fonts sizes;
(c)bug with the size of the button title (by default) did not match the value size of the label's typeface;
(d)removes high coupling the typeface parameters of button because it already contains the used label

* Hotfix to call parent `Widget::init()`
2018-09-28 23:26:58 -07:00
leda 98120fb9d8
refactor cmake on use libs (#19054)
* link external build by modern cmake

* use "--whole-archive" for part android spec

* update travis

* update CI, add cmake tests on win32
2018-09-24 20:16:04 -07:00
Arnold 53bed4fda3 DrawNode add isolate flag (#19056)
* add isolate flag

* add comment for DrawNode::visit

* add modifier: const/virtual

* update comment & change initializer
2018-09-20 15:18:03 +08:00
ggggamer 7d840ac6e1 CameraBackgroundDepthBrush should handle opengl recreate event. (#19037) 2018-09-18 09:14:27 +08:00
minggo 7dcee2bcf9
Remove ccglstatecache (#19013) 2018-09-11 14:39:30 +08:00
ggggamer f91ef9deee Fix some EVENT_RENDERER_RECREATED problem. (#19023)
* fix EVENT_RENDERER_RECREATED problem

* macro

* Event listener should add only once.
2018-09-10 15:04:35 +08:00
Arnold 8d75c07dcb Upgrade dep libs (#19015)
* add libuv
* recompile libwebsocket 2.4.2 with libuv enabled
2018-09-06 16:07:25 +08:00
tyfkda aacec550c9 Fix out of range access in Label (#18789)
Out of range occurred in some condition
when using `Label` with its `getLetter()` member function.

`Label::recordPlaceholderInfo()` member function is called for
new line (\n) letter in `Label::multilineTextWrap()`,
but the function doesn't set `_lettersInfo[letterIndex].lineIndex`.

But `lineIndex` is used in `Label::updateLabelLetters()`
even if letter is new line.

This change checks `letterInfo.valid` to avoid
accessing `_linesOffsetX[letterInfo.lineIndex]`
for invalid (i.e. `NewLine`) letter.
2018-08-06 14:27:47 +08:00
ggggamer cddcf545db Node::draw and Node::visit use wrong arg type. (#18970)
Should we use `FLAGS_TRANSFORM_DIRTY` here?
2018-08-06 13:46:31 +08:00
Riyachang c8c5fc74f7 Fix: LabelLetter::isVisible always returns false (#18975) 2018-08-06 10:09:48 +08:00
rh101 fd7f7ba085 Fix for Label and UIRichEdit text trailing space trimming (#18876)
* [UIRichText.cpp] Allow user to select if they want to trim trailing spaces for a RichElementText. Also fixed crash if estimatedIdx is less than 0 in certain conditions.
[UIRichText.h] New flag added for enabling trailing space trimming.
[CCLabelTextFormatter.cpp] Only trim trailing whitespace if lines are being split. This will trim all whitespace up to the next non-whitespace token in a line.

* Fix for oversized sprites that need to be offset by X and Y to be aligned correctly in the UIRichText

* Revert "Fix for oversized sprites that need to be offset by X and Y to be aligned correctly in the UIRichText"

This reverts commit fc5492e878a982ff748488bf1de4ffa88a3d4755.

* [UIRichText] Reverted changes made for trimming since they are no longer required. The changes made to CCLabelTextFormatter.cpp fixed all the current issues.

* Added test cases from #18869

* Removed the forced trailing space clipping since it is not required here, and causing side-effects.

* Removed comment that no longer applies to that section of code
2018-06-08 17:06:29 +08:00
Stewart Imel c84c5761a1 fix typos and grammar in comments (#18853) 2018-05-30 20:41:59 +08:00
Vasily Fomin eb87dec447 Fix misleading comment text in CCMenu.h (#18855) 2018-05-30 20:39:23 +08:00
ggggamer 59c854a159 Avoid duplicate find action when founded. (#18863) 2018-05-30 20:33:53 +08:00
Peter Siegmund bac694dc55 fix reorder warning (#18819) 2018-05-14 10:34:56 +08:00
leda 391f30a3f3 beauty cmake format, reduce duplicate defines (#18799)
* reduce cmake module duplicate

* make module use more clear, correct cmake style

* keep default physics option

* delete the modules distributed with cmake

* unify the cmake files format

* use AndroidNdkModules at cmake sys modules

* add cmake comments for win

* update cocos2dx files list, manually
2018-05-02 15:33:01 +08:00
leda fbad734633 Revert "fix issue that render texture will have wrong effect if using with global z order (#18629)" (#18777)
This reverts commit 38864456bf.
2018-04-19 09:37:05 +08:00
Jordi Vilalta Prat 712b093b27 Don't count spaces at the end of line as part of the line width (#18751) 2018-04-04 11:53:16 +08:00
sp-andres-barrera d66af06112 Support for non-breaking characters in label (#18753)
* Added non-breaking character check function

* Check for non-breaking characters in words when formatting label text

* Added nbsp again as space character (removed in previous PR https://github.com/cocos2d/cocos2d-x/pull/18147)
2018-04-02 10:27:26 +08:00
leda 86ea3a8aee cmake add collect headers list, unify the logic of source add (#18722)
* fix mistake for ios lua template

* auto select headers depend on sources

* change cmake "cocos_build_app" from macro to function

* fix cmake dll repeat copy

* update travis srcipt

* add header list for cocos lib

* add header list in cmake files

* re-add include dir Classes

* improve template cpp var name

* remove func get_headers_by_sources

* cmake add simulator header list

* make source and header collect more clear

* improve macos app pkg

* improve ios pkg, run failed

* revert the ios pak logic, keep older

* expand var APP_BIN_DIR scope

* fix use sqlite3 error on linux

* fix win32 compile error

* remove multi-add mistake

* try to fix python install issue on travis

* fix js-tests build on android

* uninstall old python in travis

* add travis  python print info

* fix command ll to ls -l

* remove useless link

* PYTHON_BIN adapt homebrew python
2018-03-14 13:51:29 +08:00
Dimon4eg d32f33056f Fix no-break space size (#18661)
* fix warnings

* added test

* fix warning

* fix no-break space size

* Correct code
2018-03-13 09:40:24 +08:00
AIGRIND 607507d97e Get ValueMap by reference (#18684)
* Get value map by reference

* Get ValueMap by constant reference
2018-03-08 10:49:29 +08:00
Dimon4eg b3285edb56 Speed up windows build (#18662)
* added precompiled headers

* Configure Visual Studio projects to use precompiled headers
2018-01-29 16:36:38 +08:00
leeda 18a6d8241d update Copyright. might need manual fix later (#18659)
* Copyright use python script updated. might be fix by manual later

* Revert "Copyright use python script updated. might be fix by manual later"

This reverts commit 49e99418e4da1fd02afda448ddeb16210f5e8c71.

* re modify copyright, consider utf-8-sig encoding

* another situation, add Copyright before  "Permission is hereby granted"

* Revert "another situation, add Copyright before  "Permission is hereby granted""

This reverts commit ee82591d32353c7ce2e146fe51ef447433b47571.

* another situation, add Copyright before Permission is hereby granted

* change "Copyright (c) 2016-2016 Chukong Technologies Inc." to " Copyright (c) 2016 Chukong Technologies Inc."

* script modify copyright, consider is cocos copyright or not

* change "Copyright (c) 2017 Chukong Technologies Inc." to "Copyright (c) 2016 Chukong Technologies Inc."

* manual fix, not fix audio related

* change "2016-2016" to "2016"
2018-01-29 16:25:32 +08:00
minggo e88a05e49a
Fix RenderTexture DepthAndStencil issue on Android (#18648)
* Fixing issue where Stencil and Depths buffers would not function for a render texture if you backgrounded an application, and then resumed.

* Fixing typo: bufffer -> buffer
2018-01-21 19:07:49 +08:00
newnon 2ff42bb38e V3 static analize fixes (#18638)
* fix different problems founded by static analize

* fix bad render assert

* Fix misprint

* reverted calloc in CCScheduler
2018-01-19 13:40:41 +08:00
minggo 38864456bf
fix issue that render texture will have wrong effect if using with global z order (#18629) 2018-01-18 14:28:40 +08:00
James Chen 2bb2e9f24a Reverts Node::cleanup changes in PR #17836 which is merged in v3.16. (#18565)
* Reverts Node::cleanup changes in PR #17836.

Reason please review the bug report: https://github.com/cocos2d/cocos2d-x/issues/18104

* Adds comment for reverting code in Node::cleanup.
2018-01-17 11:09:23 +08:00
Tiago Martines 2c025d8048 Fix actions with zero duration on NDK 16. (#18596) 2018-01-02 10:35:54 +08:00
Ruud Arentsen ea22822875 Added support for BMFont in TextField (#18587)
* Added support for BMFont in TextField

* Added cursor support for BMFont in TextFieldTTF
Made BMFont detection case insensitive and a bit more fool proof

* Added TextField::createWithBMFont, so that the font size is determined internally.

* Revert "Added TextField::createWithBMFont, so that the font size is determined internally."

This reverts commit 46b4e72ba44979b012ffa52bb78ea0a8493f7869.

* fix BMFont Cursor scale

* remove error add subproject
2017-12-29 11:24:02 +08:00
sbrednikhin f0a28d261b Partial cursor support for text field with system font (#18555)
* Partial cursor support for text field with system font

Enables cursor support without cursor blinking an zero with of cursor symbol. In case of system font usage magical "/b" symbol won't be used, also update won't be scheduled.

* Update CCTextFieldTTF.cpp
2017-12-19 08:56:30 +08:00
Yannick Berthier 1b2a48bd2a Fixed memory leak when using TTF labels (#18505)
* Fixed memory leak when using TTF labels

* FIX : Fixed memory leak in updateContent instead of dealloc
2017-12-04 09:02:13 +08:00
crazyhappygame 0ff92d3bbd Win10 remove disabled warnings (#18527) 2017-12-01 08:57:49 +08:00
will 966483be30 fix memory leak in FontFreeType::create (#18503) 2017-11-30 16:45:48 +08:00
crazyhappygame 03066ff47d Windows 10 update compiler to Visual Studio 10 PlatformToolset v141 (#18511) 2017-11-27 17:10:52 +08:00
Shura L ce5f37c7f5 set texture anti-alias by deault in RenderTexture (#18442)
fix issue #12459
2017-11-06 10:28:36 +08:00
minggo 1d356a160a
remove vs2013 libs (#18439) 2017-11-03 10:53:14 +08:00
minggo b53eb25200
use prebuilt version of Box2D (#18422) 2017-10-31 14:31:23 +08:00
SBJoker f0be714c0d Fix for Non-TTF Label Shadow, it makes it follow label opacity (#18324) 2017-10-23 11:57:43 +08:00
Nikita 4726fa3b3d Corrected bugs with cursor in TextField (#18371)
* No need to update password text in ccui TextFiled, because it's handled in TextFiledTTF

* Do not update visual state of Label if placeholder set when keyboard is attached
2017-10-23 11:37:07 +08:00
crazyhappygame d06c082bf2 Fix Windows 10 compilation (#18394) 2017-10-23 11:18:14 +08:00
okamura d13d55c23f Fix CameraBackgroundColorBrush cannot use alpha (#18281) 2017-10-20 09:43:45 +08:00
Vladimir Perminov 19ea797593 Fix crash TextFieldTTF::setCursorFromPoint (#18159)
A similar problem of
https://github.com/cocos2d/cocos2d-x/issues/15926
2017-10-16 22:58:51 -05:00
halx99 e5d19429b8 [ci skip]Make the sort behavior is same on 32bit and 64bit (#18301)
* Make the sort behavior is same on 32bit and 64bit

* Update CCNode.h

* Update CCNode.cpp

* Update ccMacros.h

* Use std::int32_t to for zOrder

* Update CCNode.cpp
2017-09-25 09:27:33 +08:00
minggo a1ef303f47 Merge pull request #18294 from minggo/sync-v316
Sync v316
2017-09-21 11:07:20 +08:00
Thorbjørn Lindeijer 7350aeca8c TMX: Added support for reading the object.rotation attribute (#11540)
Introduced with Tiled 0.10, this attribute stores the rotation of an
object in degrees clockwise.

Closes bjorn/tiled#921
2017-09-20 14:31:15 +08:00
minggo b275a3e2f0 fix conflict 2017-09-20 09:11:35 +08:00
mogemimi a5374d0411 Fix minor typos (#18289) 2017-09-20 09:05:00 +08:00
minggo bb21a206a9 update vertex buffer to update color (#18283) 2017-09-19 09:41:10 +08:00
minggo 99f5fbb63f Fix VAO in CameraBackgroundBrush (#18278) (#18279) 2017-09-18 15:47:50 +08:00