CCEditBox 编辑框

Redis Lua引擎UAF漏洞CVE-2025-49844深度剖析与复现实践 内存安全是软件系统稳定性的基石,其核心原理在于确保程序对内存的访问始终处于合法、受控的状态。在C/C++等手动管理内存的语言中,Use-After-Free(释放后使用)是一种典型的高危内存安全漏洞,它源于已释放的内存区域仍被程序指针引用,导致数据混乱或程序崩溃。这类漏洞的技术价值在于其往往能突破高级语言的安全边界,直接威胁进程本身,危害等级极高,常见于数据库、浏览器等核心基础设施。在Redis这样的高性能内存数据库中,其内置的Lua脚本引擎为复杂操作提供了强大支持,但同时也引入了沙箱环境下的复杂内存对象生 阅读详情

新建工程,名为testEdit.

修改HelloWorld.h

#ifndef __HELLOWORLD_SCENE_H__

#define __HELLOWORLD_SCENE_H__


#include "cocos2d.h"

#include "cocos-ext.h"

using namespace cocos2d::extension;

class HelloWorld : public cocos2d::CCLayer,public CCEditBoxDelegate

{

public:

    // Method 'init' in cocos2d-x returns bool, instead of 'id' in cocos2d-iphone (an object pointer)

    virtual bool init();


    // there's no 'id' in cpp, so we recommend to return the class instance pointer

    static cocos2d::CCScene* scene();

    CREATE_FUNC(HelloWorld);

    

    virtual void editBoxEditingDidBegin(CCEditBox *editBox);

    virtual void editBoxEditingDidEnd(CCEditBox *editBox);

    virtual void editBoxTextChanged(CCEditBox *editBox,const std::string &text);

    virtual void editBoxReturn(CCEditBox *editBox);

    

};


#endif // __HELLOWORLD_SCENE_H__

修改HelloWorld.cpp

#include "HelloWorldScene.h"

#include "SimpleAudioEngine.h"


using namespace cocos2d;

using namespace CocosDenshion;

#define testflag 2

CCScene* HelloWorld::scene()

{

    // 'scene' is an autorelease object

    CCScene *scene = CCScene::create();

    

    // 'layer' is an autorelease object

    HelloWorld *layer = HelloWorld::create();


    // add layer as a child to scene

    scene->addChild(layer);


    // return the scene

    return scene;

}


// on "init" you need to initialize your instance

bool HelloWorld::init()

{

    //////////////////////////////

    // 1. super init first

    if ( !CCLayer::init() )

    {

        return false;

    }

    switch (testflag) {

        case 1:

        {

            CCSize size=CCDirector::sharedDirector()->getWinSize();

            CCScale9Sprite *sacel9SprY= CCScale9Sprite::create("yellow_edit.png");

            CCEditBox *box=CCEditBox::create(CCSizeMake(300, 60), sacel9SprY);

            

            //设置编辑框内的文字

            box->setText("");

            //获取编辑框内的文字

            CCLOG("Text:%s",box->getText());

            

            //设置文本的颜色

            box->setFontColor(ccc3(255, 0, 0));

            

            //当编辑框中没有任何字符的提示

            box->setPlaceHolder("请输入帐号");

            CCLOG("PlaceHolder:%s",box->getPlaceHolder());

            

            //最大输入文本长度

            box->setMaxLength(10);

            CCLOG("Length:%i",box->getMaxLength());

            

            //设置输入模式

            box->setInputMode(kEditBoxInputModeAny);

            

            /**

             //      kEditBoxInputModeAny:         开启任何文本的输入键盘,包括换行

             //      kEditBoxInputModeEmailAddr:   开启 邮件地址 输入类型键盘

             //      kEditBoxInputModeNumeric:     开启 数字符号 输入类型键盘

             //      kEditBoxInputModePhoneNumber: 开启 电话号码 输入类型键盘

             //      kEditBoxInputModeUrl:         开启 URL 输入类型键盘

             //      kEditBoxInputModeDecimal:     开启 数字 输入类型键盘,允许小数点

             //      kEditBoxInputModeSingleLine:  开启任何文本的输入键盘,不包括换行

             //

             */

            

            //设置输入类型

            box->setInputFlag(kEditBoxInputFlagSensitive);

            /**

             //      kEditBoxInputFlagPassword:  密码形式输入

             //      kEditBoxInputFlagSensitive: 敏感数据输入、存储输入方案且预测自动完成

             //      kEditBoxInputFlagInitialCapsWord: 每个单词首字母大写,并且伴有提示

             //      kEditBoxInputFlagInitialCapsSentence: 第一句首字母大写,并且伴有提示

             //      kEditBoxInputFlagInitialCapsAllCharacters: 所有字符自动大写

             //     */

            

            

            

            

            //设置返回类型

            box->setReturnType(kKeyboardReturnTypeDone);

            /**

             //      kKeyboardReturnTypeDefault:  默认使用键盘return 类型

             //      kKeyboardReturnTypeDone:     默认使用键盘return类型为“Done”字样

             //      kKeyboardReturnTypeSend:     默认使用键盘return类型为“Send”字样

             //      kKeyboardReturnTypeSearch:   默认使用键盘return类型为“Search”字样

             //      kKeyboardReturnTypeGo:       默认使用键盘return类型为“Go”字样

             //      */

            box->setPosition(ccp(size.width*0.5, 220));

            addChild(box);

            

            CCScale9Sprite *sacel9SprG=CCScale9Sprite::create("green_edit.png");

            CCEditBox *box2=CCEditBox::create(CCSizeMake(300, 60), sacel9SprG);

            box2->setInputFlag(kEditBoxInputFlagPassword);

            box2->setReturnType(kKeyboardReturnTypeGo);

            box2->setMaxLength(12);

            box2->setPlaceHolder("请输入密码");

            box2->setPosition(ccp(size.width*0.5, 120));

            addChild(box2);


        }

            break;

            

        case 2:

        {

            CCScale9Sprite *sacel9SprG=CCScale9Sprite::create("green_edit.png");

            CCEditBox *box2=CCEditBox::create(CCSizeMake(300, 60), sacel9SprG);

            box2->setPlaceHolder("Delegate");

            box2->setPosition(ccp(220,120));            

            addChild(box2);

            box2->setDelegate(this);


        }

            break;

    }

        return true;

}



void HelloWorld::editBoxEditingDidBegin(CCEditBox *editBox)

{

    CCLOG("start edit");

}

void HelloWorld::editBoxEditingDidEnd(CCEditBox *editBox) 

{

     CCLOG("end edit");

}

void HelloWorld::editBoxTextChanged(CCEditBox *editBox,const std::string &text)

{

     CCLOG("textchanged");

}

void HelloWorld::editBoxReturn(CCEditBox *editBox)

{

     CCLOG("editboxreturn");

}




MOSS-TTS开源语音合成家族:从架构解析到生产部署实战 语音合成(TTS)技术旨在让计算机将文本转换为自然流畅的语音,其核心原理通常涉及文本分析、声学模型和声码器等模块。近年来,基于深度学习的端到端TTS模型,特别是结合残差向量量化(RVQ)和Transformer架构的方案,显著提升了合成语音的自然度和效率。这类技术的价值在于能够广泛应用于有声内容创作、智能助手、无障碍服务以及实时交互等场景。本文聚焦于开源的MOSS-TTS家族,它通过模块化设计,针对高保真合成、多角色对话、实时交互等不同需求提供了专用模型。文章深入解析了其底层的Delay与Local两种架构 阅读详情

相关推荐

【Qt笔记】1.VSCode搭建Qt运行环境

Qt6之后已经抛弃qmake,使用cmake。cmake相对qmake来说只有优点没有缺点。使用VSCode搭建完Qt的运行环境就能开开心心debug了.vscode需要使用的插件:2.Qt tools3.CMakec++插件可以不关注,缺啥都会提醒你.正常安装即可。

没有手牌的博客 2万+

EditBox 编辑框

EditBox 编辑框 用法以及常用接口: [cpp] view plain copy  print? local img = cc.Scale9Sprite:create("image/testimg2.png")   local img2 = cc.Scale9Sprite:create("image/testimg2.png")  

箭已离弓的专栏 2236

基于FFmpeg与Nginx的大华摄像头实时视频Web接入方案

本文详细介绍了一种基于FFmpeg与Nginx的大华摄像头实时视频Web接入方案。该方案通过FFmpeg将摄像头RTSP协议流转换为浏览器友好的HLS格式,并利用Nginx进行高效分发,最终结合Video.js构建前端播放页面,实现无需插件的跨平台实时监控。方案具有免费、轻量、稳定、易于部署的特点,适合中小企业、个人开发者快速搭建内部监控或展示系统。

weixin_28040125的博客 346

cocos2dx基础篇(15)——编辑框之二CCEditBox

【唠叨】 前面我们讲了精灵贴图、标签、菜单、按钮。感觉似乎少了点什么?UI控件里是不是应该还有一个很重要的控件——编辑框。在手机网游中,启动游戏,过了开场动画后,基本上显示的第一个界面应该就是游戏的登录界面了吧。输入用户名、密码什么的,这些都是需要借助编辑框来实现输入的。点击文本,弹出虚拟键盘,输入账号密码,点击登录。 cocos2dx引擎为我们提供了两类编辑框的...

weixin_33713350的博客 537

winget安装提示:执行此命令时发生意外错误: InternetOpenUrl() failed. 0x80072efd

当我们使用Winget包管理器安装应用,提示错误:执行此命令时发生意外错误: InternetOpenUrl() failed. 0x80072efd 该怎么处理呢?请听我娓娓道来。

Linux I Tell U 8136

分享一个简单的迭代学习机器人双臂控制(MATLAB)

1 什么是迭代学习控制 迭代学习控制(iterative learning control,简称ILC)由Uchiyama于1978年首先提出,不过因为论文由日文撰写,影响不是很大。1984年,Arimoto等人用英文介绍了该方法。它是指不断重复一个同样轨迹的控制尝试,并以此修正控制律,以得到非常好的控制效果的控制方法。 迭代学习控制的特点是“在重复中学习”,通过反复的迭代修正,达到改善控制效果的目的。迭代学习控制的原理是根据系统前次运行所获得的输出误差信息,在控制过程中不断修正控制输入,随着迭代的进行,逐

weixin_45776027的博客 4483

cocos-lua输入框禁止输入非数字字符

viewNode.inputUserID:setInputMode(cc.EDITBOX_INPUT_MODE_NUMERIC) --设置editBox输入模式是数字,但还是可以输入,.+#等字符 viewNode.inputUserID:setMaxLength(MAX_USERID_LEN) viewNode.inputUserID:registerScriptEditBoxHand...

小磊的专栏 3739

Ubuntu环境下rknn-toolkit2的安装与兼容性解析

本文详细解析了在Ubuntu系统上安装瑞芯微rknn-toolkit2工具链的完整流程与关键注意事项。文章重点剖析了rknn-toolkit2与旧版rknn-toolkit的核心兼容性问题,强调两者在API、模型格式及运行时库上互不兼容,并推荐使用Conda虚拟环境进行隔离管理,为RK3566、RK3588等开发板的AI模型部署提供清晰的实践指南。

weixin_29041767的博客 375

cocos2d-js 关于多端文本输入框问题

网页版 手机版this.editbox2 = new cc.EditBox(cc.size(200, 30), new cc.Scale9Sprite(res.imgBox)); this.editbox2.x = cc.winSize.width / 2; this.editbox2.y = cc.winSize.height / 2; this.editbox2.setInputMode(cc.

nsqks的博客 1098

AI 编程组合之deepseek+vscode+cline插件,使用deepseek大模型实现代码自动生成

本文介绍了VSCODE下cline插件的安装结合DeepSeek-V3,ai编程的组合套件,举了两个例子一个是生成登录页面,一个是生成贪吃蛇游戏

技术博客 7万+

大数据之VIP(Virtual IP,虚拟IP)负载均衡

VIP(Virtual IP,虚拟IP)负载均衡是一种在计算机网络中常用的技术,用于将网络请求流量均匀地分散到多个服务器上,以提高系统的可扩展性、可靠性和性能。

赵玉的专栏 4123

CCEditBox简介

有些东西,刚看的时候,可能觉得很可怕,这东西很难。迟迟不肯下手,不知拖的越长对自己越是一种折磨,并逐渐丧失信心。 万事开头难,放手去做,逼自己一下。等开始做起来。才发现并不是想象的那样,原来这东西如此简单。 CCEditBox 比 textFiled好用太多,textFiled问题很多,使用输入框基本都用CCEditBox或是自己实现组件。 基本用法: LUA -- i

图图 2138

基于深度学习的异常检测实战:从自编码器到GAN

本文通过一个完整的实战案例,展示了如何使用自编码器和GAN进行异常检测。我们详细介绍了数据准备、模型定义、训练和评估的步骤,并提供了可运行的代码。希望本文能为读者在实际项目中应用异常检测技术提供实用的指导和启发。

Programming Talk 242

Cocos2d-x中编辑框CCEditBox的使用

//设置背景图片  //ps:CCScale9Sprite对象,是一种CCSprite对象的变形,它的用法和CCSprite一样,不同点是,CCScale9Sprite对象有个特性就是缩放贴图时可以尽量不失帧。  CCScale9Sprite *pBg = CCScale9Sprite::create("extensions/orange_edit.png");    //创建编辑框  CCEdi

yuan2053的博客 1525

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

Cocos2d-x CCEditBox 编辑框

CCEditBox 编辑框 要使用CCEditBox要加如下头文件和命名空间的声明#include "cocos-ext.h" usingn amespace cocos2d; using namespace extension;bool HelloWorld::init() { ////////////////////////////// // 1. super ini

杜甲同学的专栏 3477

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

编辑框CCEditBox 设置字体不起作用

编辑框CCEditBox 字体设置: var eb = UIDef.createEditBox(this.label_input, this); eb.setPlaceholderFont(this.label_input.fontName, 25); //设置字体和大小,缺少设置字体 ,字号大小不起作用 //创建编辑框 UIDef.createEditBox = fun

cocos2dGirl的专栏 1520

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

cocos2dx基础篇(13) 编辑框之二CCEditBox

【3.x】 (1)去掉“CC” (2)设置虚拟键盘的编辑类型 >EditBoxInputMode变为强枚举EditBox::EditBoxInputMode // SINGLE_LINE //开启任何文本的输入键盘(不含换行) ANY ...

diaosong8043的博客 275

7 cocos2d-x CCEditBox 编辑框

#include "HelloWorldScene.h" #include "SimpleAudioEngine.h" #include "cocos-ext.h" using namespace cocos2d; using namespace CocosDenshion; using namespace std; CCScene* HelloWorld::scene() { //

林彬的专栏 1674

Cocos2d-x学习笔记(11)(CCEditBox编辑框)

CCEditBox编辑框类似于CCTextFieldTTF,但比CCTextFieldTTF更强大,比如密码输入形式、输入字体放大、f

yuxikuo_1的专栏 2618

cocos2dx一编辑框的使用CCEditBox

cocos2dx实现输入框,CCEditBox的简单用法,更多的设置可以查看API,看代码 #ifndef __HELLOWORLD_SCENE_H__ #define __HELLOWORLD_SCENE_H__ #include "cocos2d.h" #include "cocos-ext.h" class HelloWorld : public cocos2d::CCLaye

Flyjun 2299

cocos2dx基础篇(11)——编辑框之二CCEditBox

【唠叨】     前面我们讲了精灵贴图、标签、菜单、按钮。感觉似乎少了点什么?UI控件里是不是应该还有一个很重要的控件——编辑框。在手机网游中,启动游戏,过了开场动画后,基本上显示的第一个界面应该就是游戏的登录界面了吧。输入用户名、密码什么的,这些都是需要借助编辑框来实现输入的。点击文本,弹出虚拟键盘,输入账号密码,点击登录。     cocos2dx引擎为我们提供了两类编辑框的控件:   ...

携墨的博客 895

Lua封装增加CCEditBox编辑框接口

增加编辑框,支持Tag替换 function AddEditBox( size, pos, target, tag, zorder ) if( tag == nil ) then tag = 0; end if( zorder == nil ) then zorder = 0; end if( tag ~= 0 and target:getChildByTag(tag) ) then

在代码身上,用心去飞翔 938

(转) CCEditBox 编辑框

CCEditBox 编辑框 原文: http://blog.youkuaiyun.com/cloud95/article/details/8773470 分类: cocos2d-x 2013-04-08 19:18 4356人阅读 评论(3) 收藏 举报 新建工程,名为testEdit. 修改HelloWorld.h #ifndef __HELLOWORLD_SCENE_H__ #...

weixin_30381317的博客 77

cocos2dx[2.x](10)--编辑框之二CCEditBox

【唠叨】 前面我们讲了精灵贴图、标签、菜单、按钮。感觉似乎少了点什么?UI控件里是不是应该还有一个很重要的控件——编辑框。在手机网游中,启动游戏,过了开场动画后,基本上显示的第一个界面应该就是游戏的登录界面了吧。输入用户名、密码什么的,这些都是需要借助编辑框来实现输入的。点击文本,弹出虚拟键盘,输入账号密码,点击登录。 cocos2dx引擎为我们提供了两类编辑框的控件: (1)CCT...

qq_34240791的博客 233
上一篇: CCMenu 菜单
下一篇: CCControlSwitch 开关
缥缈的云
博客等级 码龄15年 94粉丝 179原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值