const bool g_UseServerForEmote=true; //string g_avatarType="common";//今の所commonのみ //アクションパレットコントローラコンポーネント //このコンポーネントはエモート関連を使用する際には「必ず存在するもの」とする component ActionPaletteController { public ActionPaletteController(){ // list g_actionDataModel; // g_actionDataModel = new ActionPaletteController(); } public void OnWindowActivate(bool IsActivate){ //hsSystemOutput("ActionPaletteController::OnWindowActivate\n"); } //OnLoadは何故か呼ばれない事があるため信頼しない事にする public void OnLoad(){ } //GUIボタンクリック public void OnClickedButton(string layerName,string btnName) { if(layerName=="HUD" && btnName=="hud_emote_pal_on") { LayerBundle layer = hsLayerGet("action_palette"); if(layer !== null) { // HUD右下のエモートボタン(顔アイコン)クリック layer.CallComponentMethod("ActionPaletteViewModel","ClickEmotePalOn",""); } } if(layerName=="action_palette" || layerName=="mainmenu_webxr") { LayerBundle ActionPalleteLayer = hsLayerGet("action_palette"); if(ActionPalleteLayer === null) return; if(btnName=="action_emote_off_tab") { // エモートタブクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionEmoteOffTab",btnName); } else if(btnName == "action_face_off_tab") { // フェイスタブクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionFaceOffTab",btnName); } else if(btnName == "action_add_item_btn") { // エモート追加(+マーク)ボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionAddItem",""); } else if(btnName.IndexOf("action_palette_button") != -1) { // 各種エモートボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickEmoteButton",btnName); } else if(btnName.IndexOf("action_palette_") != -1) { // 各種フェイスボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickFaceButton",btnName); } } if(layerName=="action_list") { LayerBundle ActionPalleteLayer = hsLayerGet("action_palette"); if(ActionPalleteLayer === null) return; if(btnName == "action_list_decide") { // エモートリスト決定ボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionListDecide",""); } else if(btnName == "action_list_right_page") { // エモートリスト右ページボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionListRightPage",""); } else if(btnName == "action_list_left_page") { // エモートリスト左ページボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionListLeftPage",""); } else if(btnName.IndexOf("action_emote") != -1) { // エモートリスト内エモートボタンクリック ActionPalleteLayer.CallComponentMethod("ActionPaletteViewModel","ClickActionEmote",btnName); } } } }