效果:
說明欄66
editorguilayout.beginvertical(gui.skin.box);
67 guilayout.label("
這是乙個說明欄"68
editorguilayout.endvertical();
6970
//列舉pop
71 rgb =(rgb) editorguilayout.enumpopup("
rgb列舉
",rgb);
7273
//收起控制項
74 isfoldout = editorguilayout.foldout(isfoldout, "
展開控制項");
75if
(isfoldout)
7679
//開啟資料夾
80editorguilayout.beginhorizontal();
81 guilayout.label("
開啟資料夾:");
82 folderpath =editorguilayout.textfield(folderpath);
83if (guilayout.button("瀏覽"
))85
editorguilayout.endhorizontal();
8687 guistyle labstyle = new
guistyle(unityeditor.editorstyles.label);
88 labstyle.fontsize = 15;//
設定字型大小
89 labstyle.fontstyle = fontstyle.bold;//
設定粗體
90 labstyle.alignment = textanchor.middlecenter;//
字型垂直居中
91 labstyle.normal.textcolor =color.red;//
字型顏色
92 guilayout.label(new guicontent("
guilayout.label
"),labstyle);
9394
95 guistyle btnstyle = new guistyle(gui.skin.getstyle("
button
"));
96 btnstyle.normal.textcolor = color.red;//
修改按鈕字型顏色
97//
btnstyle.normal.background
98if (guilayout.button("
guilayout.button
", btnstyle))
99102
103 editorguilayout.begintogglegroup("
勾選框",true
);104
105editorguilayout.endtogglegroup();
106//
guistyle btnstyle = new guistyle(gui.skin.getstyle(""));
107//
guistyle buttonstyle= new guistyle(unityeditor.editorstyles.label);
108//
editorguilayout.labelfield(new guicontent("editorguilayout.labelfield"));
109this
.repaint();
110}
111112
void
openfolder()
113120 }
Vue 乙個元件引用另乙個元件
有些時候需要這麼做,比如,我想在首頁載入輪播元件,但是又不想全域性註冊 因為不是每個頁面都需要輪播功能 方法1 1 template 2 div 34 testcomponent testcomponent 5div 6template 78 script 9 1.先使用import匯入你要在該元件...
makefile的乙個模板
include i.include i usr local include libxml2 i usr local ssl include i usr local include target agent lib lstdc lrt lpthread lxml2 objs patsubst cpp,...
乙個常見的錯誤
d software codeblocks test1 main.c 28 warning suggest parentheses around assignment used as truth value wparentheses warning的有道翻譯 警告 建議括號周圍的賦值作為真值 如下 ...