加入文本精灵
This commit is contained in:
@@ -6,20 +6,33 @@
|
||||
*/
|
||||
|
||||
class Window_NotiBox extends GameWindow {
|
||||
testvalue = 666;
|
||||
|
||||
constructor(Name, gX, gY, gWidth, gHeight, gTitleHeight) {
|
||||
base.constructor(Name, gX, gY, gWidth, gHeight, gTitleHeight);
|
||||
|
||||
InitSprite();
|
||||
InitButton();
|
||||
// InitButton();
|
||||
}
|
||||
|
||||
function InitSprite() {
|
||||
local Sp = Sprite("sprite/hud/newantonui.img", 0);
|
||||
AddChild(Sp);
|
||||
|
||||
local Textobj = Text("测试文本",0,sq_RGBA(255,255,255,255));
|
||||
AddChild(Textobj);
|
||||
local Textobj2 = Text("测试文本",1,sq_RGBA(255,255,255,255));
|
||||
Textobj2.SetPos(0,50);
|
||||
AddChild(Textobj2);
|
||||
}
|
||||
|
||||
function InitButton() {
|
||||
local Btn = GameWidget_BaseButton(40, 40, 56, 24, "sprite/interface/lenheartwindowcommon.img", 12);
|
||||
Btn.OnClick = function(btn){
|
||||
// print(testvalue);
|
||||
print(this);
|
||||
print(btn);
|
||||
}.bindenv(this);
|
||||
AddChild(Btn);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user