import { _decorator, Component, Node } from 'cc';
import { pointer_ding_wei_data } from '../../../data/data';
import { receive_widget_item } from './receive_widget_item';
const { ccclass, property } = _decorator;

@ccclass('widget_pointer_ding_wei')
export class widget_pointer_ding_wei extends Component {
    @property(Node) bg_widget_info:Node = null;
    @property(Node) set_pointer_bar:Node = null;
    @property(Node) set_pointer_point_bar:Node = null;
    @property(Node) set_img_save_text_res:Node = null;
    @property(Node) set_img_eys_res:Node = null;
    @property(Node) set_img_eys_res1:Node = null;
    @property(Node) set_btn_sure_res:Node = null;
    private m_data:pointer_ding_wei_data = null;
    public initView(data:pointer_ding_wei_data){
        this.m_data = data;
        this.bg_widget_info.getComponent(receive_widget_item).updateView(this.m_data.bg)
        this.set_pointer_bar.getComponent(receive_widget_item).updateView(this.m_data.pointer_bar)
        this.set_pointer_point_bar.getComponent(receive_widget_item).updateView(this.m_data.pointer_bar_point)
        this.set_img_save_text_res.getComponent(receive_widget_item).updateView(this.m_data.img_text)
        this.set_img_eys_res.getComponent(receive_widget_item).updateView(this.m_data.img_eye_1)
        this.set_img_eys_res1.getComponent(receive_widget_item).updateView(this.m_data.img_eye_2)
        this.set_btn_sure_res.getComponent(receive_widget_item).updateView(this.m_data.btn_pointer_ding_wei_sure)
    }
}


