103 lines
No EOL
4 KiB
Lua
103 lines
No EOL
4 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/13/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", 796.00, 414.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 tm_Layout
|
|
local tm_Layout = GUI:Layout_Create(img_bg, "tm_Layout", 50.00, 32.00, 400.00, 380.00, false)
|
|
GUI:setTouchEnabled(tm_Layout, false)
|
|
GUI:setTag(tm_Layout, -1)
|
|
|
|
-- Create js_btn_1
|
|
local js_btn_1 = GUI:Button_Create(tm_Layout, "js_btn_1", 201.00, 318.00, "res/custom/13/2.png")
|
|
GUI:Button_loadTexturePressed(js_btn_1, "res/custom/13/5.png")
|
|
GUI:Button_setTitleText(js_btn_1, "")
|
|
GUI:Button_setTitleColor(js_btn_1, "#ffffff")
|
|
GUI:Button_setTitleFontSize(js_btn_1, 14)
|
|
GUI:Button_titleEnableOutline(js_btn_1, "#000000", 1)
|
|
GUI:setAnchorPoint(js_btn_1, 0.50, 0.50)
|
|
GUI:setTouchEnabled(js_btn_1, true)
|
|
GUI:setTag(js_btn_1, -1)
|
|
|
|
-- Create js_btn_2
|
|
local js_btn_2 = GUI:Button_Create(tm_Layout, "js_btn_2", 336.00, 217.00, "res/custom/13/2.png")
|
|
GUI:Button_loadTexturePressed(js_btn_2, "res/custom/13/5.png")
|
|
GUI:Button_setTitleText(js_btn_2, "")
|
|
GUI:Button_setTitleColor(js_btn_2, "#ffffff")
|
|
GUI:Button_setTitleFontSize(js_btn_2, 14)
|
|
GUI:Button_titleEnableOutline(js_btn_2, "#000000", 1)
|
|
GUI:setAnchorPoint(js_btn_2, 0.50, 0.50)
|
|
GUI:setTouchEnabled(js_btn_2, true)
|
|
GUI:setTag(js_btn_2, -1)
|
|
|
|
-- Create js_btn_3
|
|
local js_btn_3 = GUI:Button_Create(tm_Layout, "js_btn_3", 294.00, 69.00, "res/custom/13/2.png")
|
|
GUI:Button_loadTexturePressed(js_btn_3, "res/custom/13/5.png")
|
|
GUI:Button_setTitleText(js_btn_3, "")
|
|
GUI:Button_setTitleColor(js_btn_3, "#ffffff")
|
|
GUI:Button_setTitleFontSize(js_btn_3, 14)
|
|
GUI:Button_titleEnableOutline(js_btn_3, "#000000", 1)
|
|
GUI:setAnchorPoint(js_btn_3, 0.50, 0.50)
|
|
GUI:setTouchEnabled(js_btn_3, true)
|
|
GUI:setTag(js_btn_3, -1)
|
|
|
|
-- Create js_btn_4
|
|
local js_btn_4 = GUI:Button_Create(tm_Layout, "js_btn_4", 105.00, 68.00, "res/custom/13/2.png")
|
|
GUI:Button_loadTexturePressed(js_btn_4, "res/custom/13/5.png")
|
|
GUI:Button_setTitleText(js_btn_4, "")
|
|
GUI:Button_setTitleColor(js_btn_4, "#ffffff")
|
|
GUI:Button_setTitleFontSize(js_btn_4, 14)
|
|
GUI:Button_titleEnableOutline(js_btn_4, "#000000", 1)
|
|
GUI:setAnchorPoint(js_btn_4, 0.50, 0.50)
|
|
GUI:setTouchEnabled(js_btn_4, true)
|
|
GUI:setTag(js_btn_4, -1)
|
|
|
|
-- Create js_btn_5
|
|
local js_btn_5 = GUI:Button_Create(tm_Layout, "js_btn_5", 64.00, 216.00, "res/custom/13/2.png")
|
|
GUI:Button_loadTexturePressed(js_btn_5, "res/custom/13/5.png")
|
|
GUI:Button_setTitleText(js_btn_5, "")
|
|
GUI:Button_setTitleColor(js_btn_5, "#ffffff")
|
|
GUI:Button_setTitleFontSize(js_btn_5, 14)
|
|
GUI:Button_titleEnableOutline(js_btn_5, "#000000", 1)
|
|
GUI:setAnchorPoint(js_btn_5, 0.50, 0.50)
|
|
GUI:setTouchEnabled(js_btn_5, true)
|
|
GUI:setTag(js_btn_5, -1)
|
|
|
|
-- Create tm_level_Atlas
|
|
local tm_level_Atlas = GUI:TextAtlas_Create(img_bg, "tm_level_Atlas", 599.00, 345.00, "0", "res/public/word_tywz_01.png", 18, 28, "0")
|
|
GUI:setTouchEnabled(tm_level_Atlas, false)
|
|
GUI:setTag(tm_level_Atlas, -1)
|
|
end
|
|
return ui |