想法 uGUI 系统,有一些很酷的东西,像masking 和世界空间 的canvas渲染 。我们将首先创建一个canvas,一个health bar的边框 ,一个mask 和 image,代表着health 的单位。然后我们使用一些脚本将单元连接起来 (我们将使用 Observer pattern )设置我们的图形第一件事首先-让我们创建一些图形。我们想要有一个holding 对象,仅有一个碰撞...
分类:
其他好文 时间:
2015-06-17 09:29:57
阅读次数:
159
一般来讲,当自定义一个控件Panel并且此控件有自定义属性时(例如:panel:closedHandle="@drawable/foot_bar_right"),xml中需要定义此控件的引用地址,(例如:xmlns:panel="http://schemas.android.com/apk/com.example.view")
这样就可以在xml中引用自定义控件了。
<Relati...
分类:
其他好文 时间:
2015-06-16 21:17:12
阅读次数:
114
这几天在项目中遇到的关于navigation bar的一些小问题以及解决的方法记录一下吧:
1. 完全透明navigation bar
有时候我们想要navigation viewcontroller顶部的navigation bar变得完全透明,我们首先想到是从story board下手,但是尝试了半天,也不能达到完全透明的效果
选择这里的Translucent Navigati...
分类:
编程语言 时间:
2015-06-16 21:14:04
阅读次数:
149
HoloColorPicker实现圆环形颜色选择器,可以改变颜色饱和度来选择颜色。选择颜色时,可以用手指沿着圆环滑动一个滑块,从而选择颜色。添加以下XML至你的布局中:?1234To add a Saturation/Value bar to your layout add this to your...
分类:
移动开发 时间:
2015-06-16 20:47:41
阅读次数:
518
理论部分1、ScrollView和HorizontalScrollView是为控件或者布局添加滚动条2、上述两个控件只能有一个孩子,但是它并不是传统意义上的容器3、上述两个控件可以互相嵌套4、滚动条的位置现在的实验结果是:可以由layout_width和layout_height设定5、Scroll...
分类:
移动开发 时间:
2015-06-15 22:00:50
阅读次数:
175
https://github.com/eltld/android-auto-scroll-view-pager
分类:
移动开发 时间:
2015-06-15 21:51:17
阅读次数:
110
以下两段程序的输出是什么?程序1:#include "stdio.h"class Base { public: int Bar(char x) { return (int)(x); } virtual int Bar(int x) { ...
分类:
编程语言 时间:
2015-06-15 18:27:25
阅读次数:
1304
用的比较少 看到知道怎么回事就okhttp://www.w3.org/TR/css3-selectors/#selectorshttp://www.cnblogs.com/jscode/archive/2012/07/30/2615748.html新增选择器列表: E[foo^="bar"]:匹配....
分类:
Web程序 时间:
2015-06-15 18:13:26
阅读次数:
136
// 滑动分页 $(window).scroll(function() { var mayLoadContent = $(window).scrollTop() >= $(document).height() - $(window).height(); var docHeight = $(docum...
分类:
其他好文 时间:
2015-06-14 20:00:59
阅读次数:
6277
原题
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where...
分类:
其他好文 时间:
2015-06-14 18:36:43
阅读次数:
102