private void OnTerrainBaseTextureChanged(object p_obj, LE_GUIInterface.EventHandlers.IntEventArgs p_args) { m_selectedTextureIndex = p_args.Value; if (m_terrainDataToCreate == null) { Debug.LogWarning("LE_LogicTerrain: OnTerrainBaseTextureChanged: terrain base texture cannot be changed after the terrain was created! If a terrain already exists then you have changed the terrain paint texture with this call."); } }
private void OnTerrainBrushChanged(object p_obj, LE_GUIInterface.EventHandlers.IntEventArgs p_args) { // select brush m_selectedBrushIndex = p_args.Value; m_GUI3dTerrain.BrushAlphaTexture = m_confT.Brushes[m_selectedBrushIndex]; // show image of the brush if possible m_GUI3dTerrain.SetCursorPosition(new Vector3(Screen.width / 2, Screen.height / 2, 0)); }
private void OnSelectedObjectVariationIndexChanged(object p_obj, LE_GUIInterface.EventHandlers.IntEventArgs p_args) { if (m_GUI3dObject.SelectedObject != null) { bool isChanged = m_GUI3dObject.SelectedObject.VariationsDefaultIndex != p_args.Value; if (isChanged) { UR_CommandMgr.Instance.Execute(new LE_CmdChangeObjectVariation(m_GUI3dObject.SelectedObject, p_args.Value)); // notify listeners that the level data was changed if (LE_EventInterface.OnChangeLevelData != null) { LE_EventInterface.OnChangeLevelData(m_GUI3dObject.SelectedObject, new LE_LevelDataChangedEvent(LE_ELevelDataChangeType.OBJECT_VARIATION)); } } } else { Debug.LogError("LE_LogicObject: OnSelectedObjectVariationIndexChanged was called, but the selected object does not allow to change this property (or nothing is selected)! You should listen to the LE_GUIInterface.delegates.SetSelectedObjectVariationPropertyValue and change the UI's state accordingly. This will prevent users from getting irritated by not working buttons."); } }
private void OnTerrainPaintTextureChanged(object p_obj, LE_GUIInterface.EventHandlers.IntEventArgs p_args) { m_selectedTextureIndex = p_args.Value; m_GUI3dTerrain.SelectedSplatPrototype = m_selectedTextureIndex; }