Text Button List ํ ์์ ฏ์ ํ ์คํธ์ ๋ฒํผ์ ํจ๊ป ํ์ํ ์ ์๋ UI์ ๋๋ค.
ํ์ฉ ์ฑ ) ์นด๋ฉ๋ผ ๊ด์ ํ๋ฆฌ๋ฏธ์ ๊ธฐ๋ฅ
Image
Example
functionopenWidget(p){//Check if player is mobile or notif(p.isMobile)//Set the widget's name, anchor position, width, and height.p.tag.widget =p.showWidget('widget.html','sidebar',300,550);elsep.tag.widget =p.showWidget('widget.html','sidebar',280,520);//Send data to widgetp.tag.widget.sendMessage({ isMobile :p.isMobile, })//Register events for messages sent from widgetsp.tag.widget.onMessage.Add(function(sender, msg) {switch (msg.type) {case'close':if(p.tag.widget) {p.tag.widget.destroy();p.tag.widget =null; }break; } })}//Event when a player joins the appApp.onJoinPlayer.Add(function(p) {// Initialize tag properties of playerp.tag = {};});// Action when the player clicks the sidebar appApp.onSidebarTouched.Add(function(p) {openWidget(p);});