组件溢出处理选择隐藏, 怎么让组件内的按钮点击生效

谷主 回复了问题 • 2 人关注 • 1 个回复 • 573 次浏览 • 2024-03-07 14:47 • 来自相关话题

cocos 3.6.3的Gloader的texture无法渲染出图片

谷主 回复了问题 • 2 人关注 • 1 个回复 • 425 次浏览 • 2024-03-06 10:15 • 来自相关话题

cocos fgui文本发布时清空的问题

回复

小白 回复了问题 • 1 人关注 • 1 个回复 • 576 次浏览 • 2024-02-23 14:24 • 来自相关话题

编辑器已经设置了一个默认的ttf(自己导入的),如何在代码里面设置默认系统字

谷主 回复了问题 • 2 人关注 • 1 个回复 • 358 次浏览 • 2024-01-22 16:42 • 来自相关话题

请问有关于tween的系统教程吗?

pwpwpw1122 回复了问题 • 2 人关注 • 2 个回复 • 515 次浏览 • 2024-01-16 17:35 • 来自相关话题

cc2.4 发布抖音小程序,报old package format found

谷主 回复了问题 • 2 人关注 • 1 个回复 • 573 次浏览 • 2024-01-05 14:58 • 来自相关话题

自制BMFont字体存在很明显的黑底

回复

robusttt 回复了问题 • 1 人关注 • 1 个回复 • 408 次浏览 • 2024-01-03 17:49 • 来自相关话题

如何优化背包drwlcall?

谷主 回复了问题 • 2 人关注 • 1 个回复 • 571 次浏览 • 2024-01-03 17:18 • 来自相关话题

cocoscreator如何制作数字滚动效果

sd1840888 回复了问题 • 2 人关注 • 1 个回复 • 687 次浏览 • 2023-12-29 17:04 • 来自相关话题

cc3.7.2,使用registerFont 注册字体,fairygui设置全局字体不生效?

hack86 回复了问题 • 3 人关注 • 2 个回复 • 750 次浏览 • 2023-12-25 21:37 • 来自相关话题

fgui 富文本在cocos creator上自动收缩不管用?

谷主 回复了问题 • 2 人关注 • 1 个回复 • 587 次浏览 • 2023-11-24 09:50 • 来自相关话题

当有fgui 的groot存在,cocos creator的node就无法点击

freelancer13 回复了问题 • 3 人关注 • 4 个回复 • 648 次浏览 • 2023-11-22 17:03 • 来自相关话题

输入框在creator3.8上位置显示不正确

sujing263 回复了问题 • 2 人关注 • 1 个回复 • 352 次浏览 • 2023-11-20 16:21 • 来自相关话题

如何获取图片被组件引用的数量?

谷主 回复了问题 • 2 人关注 • 1 个回复 • 484 次浏览 • 2023-11-20 10:07 • 来自相关话题

Gloader url引用动画播放完怎样释放包内存不释放

ccjss136 回复了问题 • 3 人关注 • 5 个回复 • 821 次浏览 • 2023-11-17 16:57 • 来自相关话题

图形遮罩支持圆角

bydreamxxx 发表了文章 • 1 个评论 • 978 次浏览 • 2023-10-26 16:13 • 来自相关话题

本来想用github发pull request的,一直clone失败
GComponent.prototype._updateGraphics = function() {
// @ts-ignore.
let graphics = this._graphics;
if (!graphics) {
return;
}
this.onDraw(graphics);
}

/**
* mask 用于绘制罩子的函数.
* this 指向mask 对象,需要特别注意.
* @param graphics
*/
GComponent.prototype.onDraw = function(graphics) {
// Share render data with graphics content
graphics.clear(false);
let node = this.node;
let width = node.width;
let height = node.height;
let x = -width * node.anchorX;
let y = -height * node.anchorY;
graphics.roundRect(x, y, width, height, this.radius || 0);
if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {
graphics.stroke();
} else {
graphics.fill();
}
}

GComponent.prototype.onMaskReady = function () {
this.off(fgui.Event.DISPLAY, this.onMaskReady, this);
if (this._maskContent instanceof fgui.GImage) {
this._customMask.type = cc.Mask.Type.IMAGE_STENCIL;
this._customMask.alphaThreshold = 0.0001;
this._customMask.spriteFrame = this._maskContent._content.spriteFrame;
}
else if (this._maskContent instanceof fgui.GGraph) {
if (this._maskContent.type == 2)
this._customMask.type = cc.Mask.Type.ELLIPSE;
else {
this._customMask.type = cc.Mask.Type.RECT;
let r = this._maskContent._cornerRadius[0];
let _radius = r >= 0 ? r : 0;
if (_radius < 1) {
_radius = Math.min(this.node.width, this.node.height) * _radius;
}
this._customMask["radius"] = _radius;
this._customMask["onDraw"] = this.onDraw.bind(this._customMask);
this._customMask["_updateGraphics"] = this._updateGraphics.bind(this._customMask);
this._customMask.type = cc.Mask.Type.RECT;
}
}
};主要修改GComponent.prototype.onMaskReady 查看全部
本来想用github发pull request的,一直clone失败
GComponent.prototype._updateGraphics = function() {
// @ts-ignore.
let graphics = this._graphics;
if (!graphics) {
return;
}
this.onDraw(graphics);
}

/**
* mask 用于绘制罩子的函数.
* this 指向mask 对象,需要特别注意.
* @param graphics
*/
GComponent.prototype.onDraw = function(graphics) {
// Share render data with graphics content
graphics.clear(false);
let node = this.node;
let width = node.width;
let height = node.height;
let x = -width * node.anchorX;
let y = -height * node.anchorY;
graphics.roundRect(x, y, width, height, this.radius || 0);
if (cc.game.renderType === cc.game.RENDER_TYPE_CANVAS) {
graphics.stroke();
} else {
graphics.fill();
}
}

GComponent.prototype.onMaskReady = function () {
this.off(fgui.Event.DISPLAY, this.onMaskReady, this);
if (this._maskContent instanceof fgui.GImage) {
this._customMask.type = cc.Mask.Type.IMAGE_STENCIL;
this._customMask.alphaThreshold = 0.0001;
this._customMask.spriteFrame = this._maskContent._content.spriteFrame;
}
else if (this._maskContent instanceof fgui.GGraph) {
if (this._maskContent.type == 2)
this._customMask.type = cc.Mask.Type.ELLIPSE;
else {
this._customMask.type = cc.Mask.Type.RECT;
let r = this._maskContent._cornerRadius[0];
let _radius = r >= 0 ? r : 0;
if (_radius < 1) {
_radius = Math.min(this.node.width, this.node.height) * _radius;
}
this._customMask["radius"] = _radius;
this._customMask["onDraw"] = this.onDraw.bind(this._customMask);
this._customMask["_updateGraphics"] = this._updateGraphics.bind(this._customMask);
this._customMask.type = cc.Mask.Type.RECT;
}
}
};
主要修改GComponent.prototype.onMaskReady

cocosCreator 3.x 的生成代码是不是不能用呀?

谷主 回复了问题 • 2 人关注 • 1 个回复 • 488 次浏览 • 2023-10-13 08:55 • 来自相关话题

[Scene] 'RenderComponent' is removed since v1.2.0, please use 'UIRenderer' instead.

谷主 回复了问题 • 2 人关注 • 1 个回复 • 851 次浏览 • 2023-09-11 18:39 • 来自相关话题

图片平铺九宫格,编辑器里面正常,creator web,手机端预览没有平铺效果

谷主 回复了问题 • 2 人关注 • 1 个回复 • 653 次浏览 • 2023-09-07 11:13 • 来自相关话题

列表没有自动排列是为什么呀,大佬们

谷主 回复了问题 • 2 人关注 • 1 个回复 • 513 次浏览 • 2023-09-07 11:01 • 来自相关话题