79 lines
No EOL
2.9 KiB
Lua
79 lines
No EOL
2.9 KiB
Lua
local ui = {}
|
|
function ui.init(parent)
|
|
-- Create Layer
|
|
local Layer = GUI:Node_Create(parent, "Layer", 0.00, 0.00)
|
|
GUI:setAnchorPoint(Layer, 0.50, 0.50)
|
|
GUI:setTag(Layer, -1)
|
|
|
|
-- Create bg_close
|
|
local bg_close = GUI:Layout_Create(Layer, "bg_close", 0.00, 0.00, 1136.00, 640.00, false)
|
|
GUI:Layout_setBackGroundColorType(bg_close, 1)
|
|
GUI:Layout_setBackGroundColor(bg_close, "#000000")
|
|
GUI:Layout_setBackGroundColorOpacity(bg_close, 0)
|
|
GUI:setTouchEnabled(bg_close, true)
|
|
GUI:setTag(bg_close, -1)
|
|
|
|
-- Create nd_root
|
|
local nd_root = GUI:Node_Create(Layer, "nd_root", 568.00, 320.00)
|
|
GUI:setAnchorPoint(nd_root, 0.50, 0.50)
|
|
GUI:setTag(nd_root, 670)
|
|
|
|
-- Create img_bg
|
|
local img_bg = GUI:Image_Create(nd_root, "img_bg", 0.00, 0.00, "res/custom/15/0.png")
|
|
GUI:setChineseName(img_bg, "背景图片")
|
|
GUI:setAnchorPoint(img_bg, 0.50, 0.50)
|
|
GUI:setTouchEnabled(img_bg, true)
|
|
GUI:setTag(img_bg, -1)
|
|
|
|
-- Create btn_close
|
|
local btn_close = GUI:Button_Create(img_bg, "btn_close", 759.00, 431.00, "res/public/1900000510.png")
|
|
GUI:Button_loadTexturePressed(btn_close, "res/public/1900000511.png")
|
|
GUI:Button_setTitleText(btn_close, "")
|
|
GUI:Button_setTitleColor(btn_close, "#ffffff")
|
|
GUI:Button_setTitleFontSize(btn_close, 14)
|
|
GUI:Button_titleDisableOutLine(btn_close)
|
|
GUI:setTouchEnabled(btn_close, true)
|
|
GUI:setTag(btn_close, -1)
|
|
|
|
-- Create Button
|
|
local Button = GUI:Button_Create(img_bg, "Button", 537.00, 30.00, "res/custom/15/3.png")
|
|
GUI:Button_loadTexturePressed(Button, "res/custom/15/4.png")
|
|
GUI:Button_setTitleText(Button, "")
|
|
GUI:Button_setTitleColor(Button, "#ffffff")
|
|
GUI:Button_setTitleFontSize(Button, 14)
|
|
GUI:Button_titleEnableOutline(Button, "#000000", 1)
|
|
GUI:setTouchEnabled(Button, true)
|
|
GUI:setTag(Button, -1)
|
|
|
|
-- Create level_Text
|
|
local level_Text = GUI:Text_Create(img_bg, "level_Text", 178.00, 402.00, 16, "#f0b42a", [[当前转生:]])
|
|
GUI:setTouchEnabled(level_Text, false)
|
|
GUI:setTag(level_Text, -1)
|
|
GUI:Text_enableOutline(level_Text, "#000000", 2)
|
|
|
|
-- Create TextAtlas
|
|
local TextAtlas = GUI:TextAtlas_Create(level_Text, "TextAtlas", 75.00, -4.00, "0", "res/public/word_tywz_01.png", 18, 28, "0")
|
|
GUI:setTouchEnabled(TextAtlas, false)
|
|
GUI:setTag(TextAtlas, -1)
|
|
|
|
-- Create d_ListView
|
|
local d_ListView = GUI:ListView_Create(img_bg, "d_ListView", 557.00, 322.00, 180.00, 60.00, 1)
|
|
GUI:ListView_setGravity(d_ListView, 5)
|
|
GUI:ListView_setItemsMargin(d_ListView, 15)
|
|
GUI:setTouchEnabled(d_ListView, true)
|
|
GUI:setTag(d_ListView, -1)
|
|
|
|
-- Create x_ListView
|
|
local x_ListView = GUI:ListView_Create(img_bg, "x_ListView", 557.00, 198.00, 180.00, 60.00, 1)
|
|
GUI:ListView_setGravity(x_ListView, 5)
|
|
GUI:ListView_setItemsMargin(x_ListView, 15)
|
|
GUI:setTouchEnabled(x_ListView, true)
|
|
GUI:setTag(x_ListView, -1)
|
|
|
|
-- Create xh_Layout
|
|
local xh_Layout = GUI:Layout_Create(img_bg, "xh_Layout", 493.00, 81.00, 220.00, 66.00, false)
|
|
GUI:setTouchEnabled(xh_Layout, false)
|
|
GUI:setTag(xh_Layout, -1)
|
|
|
|
end
|
|
return ui |