示例#1
0
    //-----------------------------------------------------------------
    void Start()
    {
        //databaseController = GameObject.Find("- == Database Controller == -");
        theRoomViewerMenu = databaseController.GetComponent <RoomViewerMenu>();

        uiRectTransform = gameObject.GetComponent <RectTransform>();                           //align old GUI object to 4.6 UI object
        colorPanelRect  = RectTransformToScreenSpace(uiRectTransform);
        Debug.Log(colorPanelRect);
    }
示例#2
0
    //ToggleGroup uiTG_activeRoomTGroup;



    void Start()
    {
        databaseController  = GameObject.Find("- == Database Controller == -");
        theRoomViewerMenu   = databaseController.GetComponent <RoomViewerMenu>();
        uiPanel_colorPicker = theRoomViewerMenu.colorPickerRef; //GameObject.Find("Panel_ColorPicker");

        /*
         * ui_fieldRoomID = transform.Find("InputField_RVERoomID").gameObject;
         * ui_fieldRoomName = transform.Find("InputField_RVEName").gameObject;
         * ui_btnRoomColor = transform.Find("Button_RVEColor").gameObject;
         * ui_tglActiveRoom = transform.Find("Toggle_RVEActive").gameObject;
         * ui_txtRmIndex = transform.Find("Toggle_RVEActive/ValueLabel_RoomIndex").gameObject;
         * ui_btnCamTL = transform.Find("Button_RVECamBoundsTL").gameObject;
         * ui_btnCamBR = transform.Find("Button_RVECamBoundsBR").gameObject;
         */
        uiTx_RoomIndex     = ui_txtRmIndex.GetComponent <Text>();
        uiIF_roomID        = ui_fieldRoomID.GetComponent <InputField>();
        uiIF_roomName      = ui_fieldRoomName.GetComponent <InputField>();
        uiImg_roomColorImg = ui_btnRoomColor.GetComponent <Image>();
        uiBtn_roomColor    = ui_btnRoomColor.GetComponent <Button>();
        uiTgl_activeRoom   = ui_tglActiveRoom.GetComponent <Toggle>();
        uiBtn_camTL        = ui_btnCamTL.GetComponent <Button>();
        uiBtn_camBR        = ui_btnCamBR.GetComponent <Button>();
        uiImg_camTLSet     = ui_btnCamTL.transform.GetChild(0).GetComponent <Image>();
        uiImg_camBRSet     = ui_btnCamBR.transform.GetChild(0).GetComponent <Image>();
        uiTx_camTL         = ui_btnCamTL.transform.GetChild(1).GetComponent <Text>();
        uiTx_camBR         = ui_btnCamBR.transform.GetChild(1).GetComponent <Text>();


        uiTgl_activeRoom.group = databaseController.GetComponent <ToggleGroup>();  //assign ToggleGroup

//-------- init Room --------------------
        SetRoomIndex();
        SetRoomDefaultValues();
        theRoomViewerMenu.roomEntries.Add(gameObject);
        AssignButtonListeners();
        DeactivateRoomEntry();
        if (theRoomViewerMenu.userIsEditingAnEntry == true)
        {
            uiTgl_activeRoom.interactable = false;
        }
    }
 void Awake()
 {
     databaseController = GameObject.Find("- == Database Controller == -");
     theRoomViewerMenu  = databaseController.GetComponent <RoomViewerMenu>();
 }
示例#4
0
//--------------------------------------------------------------------

    void Start()
    {
        theRoomViewerMenu = GetComponent <RoomViewerMenu>();
    }