newlist

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 26 下一页

2013年6月24日

摘要: #include "XSprite.h"CXSprite::CXSprite(void){ m_strPic.clear();}CXSprite::~CXSprite(){}/**********************************函数名称:createSprite*函数功能:创建精灵*函数参数:const char* psFile--创建精灵用的图片 int nFrameIndex--(-1--普通图片 0-2--按钮图片帧(按钮统一为3帧))*函数返回值:创建的精灵指针*备注:分两种情况来创建1.第一种:只是简单的通过图片来创建2.第二种:通过纹理来创... 阅读全文
posted @ 2013-06-24 17:13 一枚程序 阅读(375) 评论(0) 推荐(0)

摘要: #ifndef __XSprite_H__#define __XSprite_H__#include "CocoHead.h"#define BTN_FRAME_AMOUNT 3class ENGINE_API CXSprite : public CCSprite{public: /* 按钮的图片分割成几张 那个分割后每张的索引值 */ enum BTN_FRAME_INDEX { BTN_FRAME_0 = 0, BTN_FRAME_1 = 1, BTN_FRAME_2 = 2, BTN_FRAME_3... 阅读全文
posted @ 2013-06-24 17:12 一枚程序 阅读(272) 评论(0) 推荐(0)

摘要: #include "SectsInfomation.h"#include "WidgetMgr.h"#include "XButton.h"#include "XSroll.h"#include "Config.h"#include "XCommon.h"#include "XStatic.h"#include "XImage.h"#if(CC_TARGET_PLATFORM == CC_PLATFORM_IOS)#include &q 阅读全文
posted @ 2013-06-24 16:07 一枚程序 阅读(322) 评论(0) 推荐(0)

摘要: #ifndef SECTSINFOMATION_H#define SECTSINFOMATION_H#include "XWidget.h"#include "XImage.h"#include "XStatic.h"#include class CXButton;class CSectsInfomation : public CXWidget{public: CSectsInfomation(void); ~CSectsInfomation(void);public: enum CSectsInfomationId { _IDD_C 阅读全文
posted @ 2013-06-24 16:06 一枚程序 阅读(263) 评论(0) 推荐(0)

2013年6月23日

摘要: /************************************************************************///屏蔽消息面板 //优先级默认为 TP_BOTTOM = 1, // /************************************************************************/#ifndef __XNOTOUCH_H__#define __XNOTOUCH_H__#include "XWindow.h"class ENGINE_API CXNoTouch : public CXWind 阅读全文
posted @ 2013-06-23 18:37 一枚程序 阅读(969) 评论(0) 推荐(0)

摘要: #ifndef __XSROLL_H__#define __XSROLL_H__#include "CocoHead.h"#include "XWindow.h"class ENGINE_API CXSroll : public CXWindow{public: enum XSrollType { _SrollDirectionVertical = 0, //垂直 _SrollDirectionHorizontal = 1, //水平 _SrollVerticalTable ... 阅读全文
posted @ 2013-06-23 16:48 一枚程序 阅读(411) 评论(0) 推荐(0)

摘要: 1 /************************************* 2 *函数名称:visit 3 *函数功能:获取游戏设计的分辨率与真实设备的比例,并根据值来剪切显示区域 4 *函数参数:void 5 *函数返回值:void 6 *笔记: 7 1.glEnable用于开启opengl相应的功能 8 2.GL_SCISSOR_TEST根据函数glScissor设置,启用图形剪切 9 3.glScissor10 http://blog.csdn.net/augusdi/article/details/728221411 ****************************... 阅读全文
posted @ 2013-06-23 16:34 一枚程序 阅读(586) 评论(0) 推荐(0)

2013年6月20日

摘要: //编码转换 //#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) // string title = "成绩"; // GBK2UTF8(title,"gb2312","utf-8"); //#endif static int GBK2UTF8(std::string & gbkStr, const char* toCode, const char* fromCode) { iconv_t iconvH; iconvH = iconv_open(fromCo... 阅读全文
posted @ 2013-06-20 12:03 一枚程序 阅读(504) 评论(0) 推荐(0)

摘要: /****************************************************************************Copyright (c) 2010 cocos2d-x.orghttp://www.cocos2d-x.orgPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin t 阅读全文
posted @ 2013-06-20 11:21 一枚程序 阅读(1381) 评论(0) 推荐(0)

摘要: //转换坐标 //锚点为(x,x)是的坐标转换成锚点为(0,0)的坐标 //例如:把锚点(0.5,0.5)坐标(0,0)转换成 //锚点(0.5,0.5)坐标(0 - pNode.getContentSize.width * 0.5,0 - pNode.getContentSize.Height * 0.5) static void anchorToLocalPos(CCNode* pNode) { pNode->setPositionX(pNode->getPositionX() + pNode->getContentSize().width * ... 阅读全文
posted @ 2013-06-20 10:07 一枚程序 阅读(544) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 26 下一页