游戏 标签gui.label
using UnityEngine; using System.Collections;
public class Gui : MonoBehaviour {
public string str;
public Texture imageTexture;
private int screenWidth;
private int screenHeight; // Use this for initialization void Start () { screenWidth = Screen.width; screenHeight = Screen.height; } // Update is called once per frame void Update () { }
void OnGUI() { GUI.Label (new Rect (100, 10, 100, 30), str); GUI.Label (new Rect (100, 40, 100, 30), "当前屏幕宽"+screenWidth); GUI.Label (new Rect (100, 80, 100, 30), "当前屏幕高"+screenHeight); } }
using UnityEngine;
using System.Collections; public class Gui : MonoBehaviour { public string str; public Texture imageTexture; private int screenWidth; private int screenHeight;
// Use this for initialization
void Start () {
screenWidth = Screen.width;
screenHeight = Screen.height;
} // Update is called once per frame
void Update () { } void OnGUI()
{
GUI.Label (new Rect (, , , ), str);
GUI.Label (new Rect (, , , ), "当前屏幕宽"+screenWidth);
GUI.Label (new Rect (, , , ), "当前屏幕高"+screenHeight);
}
}
游戏 标签gui.label的更多相关文章
- 游戏引擎/GUI的设计与实现-序
几年前写<嵌入式GUI FTK设计与实现>,没写几篇就停止更新了.当时自己研究过MicroWindows, X Window, DirectFB, GTK+和Android的GUI,又写过 ...
- Cocos2d-x 3.0标签类Label
Cocos2d-x 3.0后推出了新的标签类Label,这种标签通过使用FreeType[1]来使它在不同的平台上有相同的视觉效果.由于使用更快的缓存代理,它的渲染也将更加快速.Label提供了描边和 ...
- 小tips:JS语法之标签(label)
JavaScript语言允许,语句的前面有标签(label),相当于定位符,用于跳转到程序的任意位置,标签的格式如下. label: statement 标签可以是任意的标识符,但是不能是保留字,语句 ...
- 8、html的body内标签之fieldset标签和label标签
一.label标签 <label> 标签为 input 元素定义标签(label). label 元素不会向用户呈现任何特殊的样式.不过,它为鼠标用户改善了可用性,因为如果用户点击 lab ...
- 列表框、分组列表框、标签(label)、分组框(fieldset)、框架(frameset)
列表框(select) 下拉列表,用户可以从一些可选项中选择. 示例:简单的下拉列表 <select name="country"> <option value= ...
- unity3d 改动gui label颜色,定义颜色需除以256
GUIStyle titleStyle2 = new GUIStyle(); titleStyle2.fontSize = 20; titleStyle2.normal.textColor = new ...
- k8s核心资源之:标签(label)
简介 label是标签的意思,一对 key/value ,被关联到对象上,k8s中的资源对象大都可以打上标签,如Node.Pod.Service 等 一个资源可以绑定任意多个label,k8s 通过 ...
- 标签(Label、JLabel)
构造函数 Label( ) Label(String str) Label(String str, int how) 第一种形式生成一个空白标签:第二种形式生成一个包含由参数str所设定的字符串的标签 ...
- html的body内标签之label标签和fieldset标签
1. <label> 标签为 input 元素定义标注(标记). label 元素不会向用户呈现任何特殊效果.不过,它为鼠标用户改进了可用性.如果您在 label 元素内点击文本,就会触发 ...
随机推荐
- C#父类子类对象关系
案例: 主要有Vehicle.cs Airplane.cs Car.cs 3个类. Car和Airplane都继承与Vehicle类.Vehicle中Drive为虚方法,可在子类中重写,父类引 ...
- WinAPI: ExtCreateRegion - 区域变换
转载:http://www.cnblogs.com/del/archive/2008/06/03/1212534.html 相似函数: SetWorldTransform 本例效果图: 代码文件: u ...
- cmake编译dcmtk,并利用vs2010 进行开发mfc 程序
这几天要处理 医学图像数据,经同学推荐 采用 dcmtk 关于 编译 dcmtk 是可参考如下blog 1. http://blog.csdn.net/okaimee/article/details/ ...
- HDOj 1010 DFS优化
#include<cstdio> #include<cstring> ]={,,,-}; ]={,,-,}; ][]; int x1,y1,x2,y2; int step; i ...
- django-cms 代码研究(三)插件(plugs in)
插件(plugs in) djangocms支持的插件有: http://docs.django-cms.org/en/latest/basic_reference/plugin_reference. ...
- sublime 实用 快捷键
alt+- 向后导航 alt+shift+- 向前导航 ctrl+shift+↑↓ 上下移动一行 ctrl+k,ctrl+u 转换所选为大写 ctrl+k,ctrl+l(字母L) 转换所选为小写 ct ...
- LINUX安全设置
3. 为单用户引导加上密码 在“/etc/lilo.conf”文件中加入三个参数:time-out,restricted,password.这三个参数可以使你的系统在启动lilo时就要求密码验证. ...
- sysctl命令详解
个人一般sysctl -p 或sysctl -a比较多使用 sysctl配置与显示在/proc/sys目录中的内核参数.可以用sysctl来设置或重新设置联网功能,如IP转发.IP碎片去除以及源路由检 ...
- (二)STM32中中断优先级理解
很多人在配置STM32中断时对固件库中的这个函数NVIC_PriorityGroupConfig()——配置优先级分组方式,会很不理解,尤其是看中文翻译版的,因为中文翻译版里把这里翻译成“先占优先级和 ...
- Struts文件上传allowedTypes问题,烦人的“允许上传的文件类型”
Struts的文件上传问题,相信很多人都会使用allowedTypes参数来配置允许上传的文件类型,如下. <param name="allowedTypes"> im ...