lgq
2026-03-31 e491cdb48129752324c4e3764f99bd9203c56dec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import ui from "../dxmodules/dxUi.js";
import std from "../dxmodules/dxStd.js"
 
// ui上下文
let context = {}
 
// ui初始化
ui.init({ orientation: 0 }, context);
 
const screenMain = ui.View.build('mainView', ui.Utils.LAYER.MAIN)
 
const bottomSnBtn = ui.Button.build('bottomSnBtn', screenMain)
bottomSnBtn.bgColor(0xff0000)
bottomSnBtn.bgOpa(20)
bottomSnBtn.setSize(200, 100)
bottomSnBtn.setPos(100, 700)
 
 
bottomSnBtn.on(ui.Utils.EVENT.CLICK, () => {
    print("passwordView")
})
 
// 加载屏幕
ui.loadMain(screenMain)
 
// 刷新ui
let timer = std.setInterval(() => {
    if (ui.handler() < 0) {
        std.clearInterval(timer)
    }
}, 1)