difenduandada
2024-12-31 34abe6963b344c882358274957f4b992456fee40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"use strict";
cc._RF.push(module, 'c0e33PMi69FxZXnqOntHkF6', 'guild_impeach_post_window');
// Scripts/mod/guild/view/guild_impeach_post_window.js
 
"use strict";
 
// --------------------------------------------------------------------
// @author: shiraho@syg.com(必填, 创建模块的人员)
// @description:
//      弹劾面板
// <br/>Create: new Date().toISOString()
// --------------------------------------------------------------------
var PathTool = require("pathtool");
 
var GuildController = require("guild_controller");
 
var GuildImpeachPostWindow = cc.Class({
  "extends": BaseView,
  ctor: function ctor() {
    this.prefabPath = PathTool.getPrefabPath("guild", "guild_impeach_post_window");
    this.win_type = WinType.Mini;
    this.viewTag = SCENE_TAG.dialogue;
    this.ctrl = GuildController.getInstance();
  },
  openCallBack: function openCallBack() {
    this.background = this.seekChild("background");
    this.close_btn = this.seekChild("close_btn");
    this.background.scale = FIT_SCALE;
    this.notice = this.seekChild("notice", cc.Label);
    this.impeach_btn = this.seekChild("impeach_btn");
    this.text_diamond = this.seekChild(this.impeach_btn, "textDiamond", cc.Label);
    this.btn_sp = this.seekChild(this.impeach_btn, "sprite", cc.Sprite);
    this.loadRes(PathTool.getItemRes(3), function (bg_sp) {
      this.btn_sp.spriteFrame = bg_sp;
    }.bind(this));
  },
  registerEvent: function registerEvent() {
    this.background.on(cc.Node.EventType.TOUCH_END, function () {
      this.ctrl.openGuildImpeachPostWindow(false);
    }, this);
    this.close_btn.on(cc.Node.EventType.TOUCH_END, function () {
      this.ctrl.openGuildImpeachPostWindow(false);
    }, this);
    this.impeach_btn.on(cc.Node.EventType.TOUCH_END, function () {
      this.ctrl.send13565();
      this.ctrl.openGuildImpeachPostWindow(false);
    }, this);
  },
  openRootWnd: function openRootWnd() {
    if (this.notice) {
      this.notice.string = Utils.TI18N("该会长长期不在线,为了公会的健康发展,需要一位新的会长站出来。弹劾会长后,你将成为新的会长");
    }
 
    this.text_diamond.string = gdata("guild_data", "data_const", "impeach_gold").val[0][1];
  },
  closeCallBack: function closeCallBack() {
    this.ctrl.openGuildImpeachPostWindow(false);
  }
});
module.exports = GuildImpeachPostWindow;
 
cc._RF.pop();