private static int getStatusHeight(Context context){
int statusHeight = 0;
Rect localRect = new Rect();
((Activity) context).getWindow().getDecorView().getWindowVisibleDisplayF...
分类:
移动开发 时间:
2014-09-17 01:11:41
阅读次数:
249
说到画图,pygame提供了一些很有用的方法进行draw画图。'''pygame.draw.rect - draw a rectangle shape draw a rectangle shapepygame.draw.polygon - draw a shape with any numbe...
分类:
其他好文 时间:
2014-09-16 22:03:41
阅读次数:
937
一、重写 DrwaRect-(void)drawRect:(CGRect)rect{ CGRect bounds = self.bounds; CGPoint center; center.x = bounds.origin.x + bounds.size.width / ...
分类:
其他好文 时间:
2014-09-16 14:12:50
阅读次数:
200
这个类主要提供屏幕各个特殊位置的坐标。附上头文件代码: 1 class VisibleRect 2 { 3 public: 4 static cocos2d::Rect getVisibleRect();// 获取屏幕矩形 5 6 static cocos2d::Vec2 left...
分类:
其他好文 时间:
2014-09-15 22:40:29
阅读次数:
379
css:#scroll { position: fixed; right: 100px; bottom:30px; z-index: 1000; _position: absolute; _top: 100%; _right: 100px; _bottom: 0; }.scrollItem { cu...
分类:
其他好文 时间:
2014-09-15 19:28:09
阅读次数:
219
unity版本:4.5 NGUI版本:3.6.5 参考链接:http://blog.csdn.net/monzart7an/article/details/23878505,作者:CSDN 冬菊子 http://blog.csdn.net/unity3d_xyz/article/det...
分类:
其他好文 时间:
2014-09-15 19:23:39
阅读次数:
222
列表控件可以看作是功能增强的ListBox,它提供了四种风格,而且可以同时显示一列的多中属性值。MFC中使用CListCtrl类来封装列表控件的各种操作。通过调用BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT ...
分类:
编程语言 时间:
2014-09-15 14:19:18
阅读次数:
298
1、首先创建皮肤,贴图2、在代码中定义public GUISkin变量,在Inspector中赋值3、在OnGUI中调用 GUI.skin = mySkin; GUI.Button(new Rect(10,10,100,100),"",GUI.skin.GetStyle("name"));
分类:
其他好文 时间:
2014-09-11 23:45:02
阅读次数:
254
【唠叨】数学类Vec2、Size、Rect,是cocos2dx中比较常用的类。比如设置图片位置,设置图片大小,两图片的碰撞检测等等。比起2.x版本,在3.2中本质上其实没有太大的变化,主要的变化就是将全局宏定义相关的操作封装到各自的类中而已。比如:Vec2的向量运算宏定义ccp***(),现在..
分类:
其他好文 时间:
2014-09-11 02:21:12
阅读次数:
226
overflow-x:scroll是横的有overflow-y:scroll是竖的有overflow:scroll横竖有overflow:hidden横竖都没有
分类:
其他好文 时间:
2014-09-10 20:56:40
阅读次数:
161