最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

unity3D技术之guilayout.maxwidth 最大宽度

IT圈 admin 32浏览 0评论

2024年4月16日发(作者:端木诗珊)

description描述

option passed to a control to specify a maximum width.

传递给控件指定一个最大宽度的选项。

maximum allowed width for a window.

用于窗口允许的最大宽度。(文章出自狗刨学习网)

c#

javascript

using unityengine;

using tions;

public class example :monobehaviour{

privaterectwindowrect = newrect(10, 10, 100, 100);

private bool scaling = false;

void ongui() {

windowrect = (0, windowrect, scalingwindow,

"resizeable",th(80),th(200));

}

void scalingwindow(int windowid) {

("",(20),(20));

if ( ==p)

scaling = false;

else

if (

==own&&trect().contains(t.

mouseposition))

scaling = true;

if (scaling)

windowrect = new rect(windowrect.x, windowrect.y,

+.x, +.y);

}

}

// draws a window you can resize between 80px and 200px width

// just click the box inside the window and move your mouse

//绘制一个窗口你可以在80px~200px宽度之间调整大小,仅在窗口中box上点击

拖动鼠标

private var windowrect : rect = rect (10, 10, 100, 100);

private var scaling : boolean = false;

function ongui () {

windowrect =(0, windowrect, scalingwindow, "resizeable",

th(80),th(200));

}

function scalingwindow (windowid : int) {

("", (20), (20));

if ( ==p) {

scaling = false;

}

else if ( ==own&&

trect().contains(osition)) {

scaling = true;

}

if (scaling) {

windowrect =rect(windowrect.x, windowrect.y,

+.y);

+.x,

}

}

2024年4月16日发(作者:端木诗珊)

description描述

option passed to a control to specify a maximum width.

传递给控件指定一个最大宽度的选项。

maximum allowed width for a window.

用于窗口允许的最大宽度。(文章出自狗刨学习网)

c#

javascript

using unityengine;

using tions;

public class example :monobehaviour{

privaterectwindowrect = newrect(10, 10, 100, 100);

private bool scaling = false;

void ongui() {

windowrect = (0, windowrect, scalingwindow,

"resizeable",th(80),th(200));

}

void scalingwindow(int windowid) {

("",(20),(20));

if ( ==p)

scaling = false;

else

if (

==own&&trect().contains(t.

mouseposition))

scaling = true;

if (scaling)

windowrect = new rect(windowrect.x, windowrect.y,

+.x, +.y);

}

}

// draws a window you can resize between 80px and 200px width

// just click the box inside the window and move your mouse

//绘制一个窗口你可以在80px~200px宽度之间调整大小,仅在窗口中box上点击

拖动鼠标

private var windowrect : rect = rect (10, 10, 100, 100);

private var scaling : boolean = false;

function ongui () {

windowrect =(0, windowrect, scalingwindow, "resizeable",

th(80),th(200));

}

function scalingwindow (windowid : int) {

("", (20), (20));

if ( ==p) {

scaling = false;

}

else if ( ==own&&

trect().contains(osition)) {

scaling = true;

}

if (scaling) {

windowrect =rect(windowrect.x, windowrect.y,

+.y);

+.x,

}

}

发布评论

评论列表 (0)

  1. 暂无评论