Esempio n. 1
0
        public void updateData()
        {
            if ((mData == null) || (mNode == null))
            {
                return;
            }

            // Move control data to data (CONTROL DATA -> DATA)
            //
            visualModelComponentAsset afterChanges = new visualModelComponentAsset();

            afterChanges.type       = visualModelComponentAsset.ComponentAssetType.Model;
            afterChanges.file       = fileBrowseControl1.FileName;
            afterChanges.damagefile = fileBrowseControl2.FileName;

            afterChanges.uvOffset[0].uOfs = sizeXFloatSliderEdit.Value;
            afterChanges.uvOffset[0].vOfs = sizeZFloatSliderEdit.Value;
            afterChanges.uvOffset[1].uOfs = floatSliderEdit2.Value;
            afterChanges.uvOffset[1].vOfs = floatSliderEdit3.Value;
            afterChanges.uvOffset[2].uOfs = floatSliderEdit4.Value;
            afterChanges.uvOffset[2].vOfs = floatSliderEdit5.Value;

            // Load asset
            afterChanges.loadAsset();

            // Add/Execute undo action
            UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges);

            mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction);
        }
Esempio n. 2
0
        // ---------------------------------
        // Even Handlers
        // ---------------------------------

        private void fileBrowseControl1_ValueChanged(object sender, EventArgs e)
        {
            // early out if currently binding data
            if (mIsBindingData)
            {
                return;
            }

            updateData();

            // Load new model file
            mData.loadAsset();
        }