新增画布类,三联,九宫格控件
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
创建日期:2025-10-11 11:21
|
||||
文件用途:主界面UI
|
||||
*/
|
||||
|
||||
Actora <- null;
|
||||
//主界面UI初始化回调
|
||||
function _MainUI_Enter_(UI_Scene) {
|
||||
if (!_SYS_UI_SCENE_Instance_) _SYS_UI_SCENE_Instance_ = Actor(UI_Scene);
|
||||
//初始化随机数种子
|
||||
srand(time());
|
||||
|
||||
//初始化鼠标
|
||||
Game_Cursor.GetInstance();
|
||||
@@ -16,13 +16,36 @@ function _MainUI_Enter_(UI_Scene) {
|
||||
local TestWindow = sq_CreaterWindowInstance("HUD窗口", Window_hud, 0, 0, 1280, 720, 0);
|
||||
TestWindow.ResetFoucus();
|
||||
|
||||
local Test1 = sq_CreaterWindowInstance("测试窗口", Window_NotiBox, 150, 150, 364, 356, 20);
|
||||
Test1.ResetFoucus();
|
||||
// local Tc = GameWidget_TripleCav("sprite/interface/lenheartwindowcommon.img",175,300);
|
||||
// _SYS_UI_SCENE_Instance_.AddChild(Tc);
|
||||
// Tc.SetPos(400,300);
|
||||
|
||||
local NgC = GameWidget_NineGridCav("sprite/interface/lenheartwindowcommon.img", 97, 300, 300);
|
||||
_SYS_UI_SCENE_Instance_.AddChild(NgC);
|
||||
NgC.SetPos(400, 300);
|
||||
|
||||
// local T = sq_GetPng("sprite/item/avatar/swordman/0sm_acap.img",0);
|
||||
// print(T);
|
||||
|
||||
// local Test1 = sq_CreaterWindowInstance("测试窗口", Window_NotiBox, 150, 150, 364, 356, 20);
|
||||
// Test1.ResetFoucus();
|
||||
|
||||
// local Canv = Canvas(600, 600);
|
||||
// _SYS_UI_SCENE_Instance_.AddChild(Canv);
|
||||
|
||||
// for (local i = 0; i < 10000; i++) {
|
||||
// Canv.DrawImg("sprite/item/avatar/swordman/0sm_acap.img", 0, i % 600, i / 600 * 28);
|
||||
// }
|
||||
}
|
||||
//主界面UI事件回调
|
||||
function _MainUI_HandleEvents_(EventType, EventData) {
|
||||
_Global_Windows_Events_(EventType, EventData);
|
||||
if (EventType == UI_EVENT.MOUSEBUTTONDOWN) {
|
||||
if (Actora) {
|
||||
_SYS_UI_SCENE_Instance_.RemoveChild(Actora);
|
||||
Actora = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
//主界面UI更新回调
|
||||
function _MainUI_Update_(deltaTime) {
|
||||
|
||||
Reference in New Issue
Block a user