71 lines
No EOL
2.6 KiB
Lua
71 lines
No EOL
2.6 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/16/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 xh_Layout
|
|
local xh_Layout = GUI:Layout_Create(img_bg, "xh_Layout", 474.00, 105.00, 260.00, 60.00, false)
|
|
GUI:setTouchEnabled(xh_Layout, false)
|
|
GUI:setTag(xh_Layout, -1)
|
|
|
|
-- Create up_btn
|
|
local up_btn = GUI:Button_Create(img_bg, "up_btn", 537.00, 44.00, "res/custom/16/1.png")
|
|
GUI:Button_loadTexturePressed(up_btn, "res/custom/16/2.png")
|
|
GUI:Button_setTitleText(up_btn, "")
|
|
GUI:Button_setTitleColor(up_btn, "#ffffff")
|
|
GUI:Button_setTitleFontSize(up_btn, 14)
|
|
GUI:Button_titleEnableOutline(up_btn, "#000000", 1)
|
|
GUI:setTouchEnabled(up_btn, true)
|
|
GUI:setTag(up_btn, -1)
|
|
|
|
-- Create EquipShow
|
|
local EquipShow = GUI:EquipShow_Create(img_bg, "EquipShow", 224.00, 200.00, 3, false, {bgVisible = false, look = true, starLv = true})
|
|
GUI:setTag(EquipShow, -1)
|
|
GUI:EquipShow_setAutoUpdate(EquipShow)
|
|
|
|
-- Create ListView
|
|
local ListView = GUI:ListView_Create(img_bg, "ListView", 474.00, 230.00, 260.00, 140.00, 1)
|
|
GUI:ListView_setGravity(ListView, 5)
|
|
GUI:setTouchEnabled(ListView, true)
|
|
GUI:setTag(ListView, -1)
|
|
|
|
-- Create L_Text
|
|
local L_Text = GUI:Text_Create(img_bg, "L_Text", 255.00, 412.00, 16, "#00ff00", [[文本]])
|
|
GUI:setAnchorPoint(L_Text, 0.50, 0.50)
|
|
GUI:setTouchEnabled(L_Text, false)
|
|
GUI:setTag(L_Text, -1)
|
|
GUI:Text_enableOutline(L_Text, "#000000", 2)
|
|
end
|
|
return ui |