예제 #1
0
파일: Entity.cs 프로젝트: woncomp/LiliumLab
 void CreateControls()
 {
     List<Lilium.Controls.Control> list = new List<Lilium.Controls.Control>();
     var label1 = new Lilium.Controls.Label("Transform", () => "Move: X:J/L Y:U/O Z:K/I");
     list.Add(label1);
     var label2 = new Lilium.Controls.Label("", () => "Press Control to move faster.");
     list.Add(label2);
     var label3 = new Lilium.Controls.Label("", () => "Rotate:[/] Scale:-/+");
     list.Add(label3);
     var label4 = new Lilium.Controls.Label("Position", () =>Position.ToString("0.000"));
     list.Add(label4);
     var label5 = new Lilium.Controls.Label("Rotation", () => Rotation.ToString("0.000"));
     list.Add(label5);
     var label6 = new Lilium.Controls.Label("Scale", () => Scale.ToString("0.000"));
     list.Add(label6);
     var toggle = new Lilium.Controls.Toggle("Draw Gizmo", () => Config.DrawGizmo, val => Config.DrawGizmo = val);
     list.Add(toggle);
     var slider = new Lilium.Controls.Slider("Stencil Shadow", 0, 1, () => StencilShadowIndensity, val => StencilShadowIndensity = val);
     list.Add(slider);
     if(SkinnedMesh != null && SkinnedMesh.AnimationClips.Count > 0)
     {
         foreach (var anim in SkinnedMesh.AnimationClips)
         {
             var animName = anim.Key;
             //var anim
             var btn = new Lilium.Controls.Button("Play " + animName, ()=>
                 {
                     SkinnedMesh.PlayAnimation(animName);
                 });
             list.Add(btn);
         }
     }
     if (Mesh != null)
     {
         for (int i = 0; i < Mesh.SubmeshCount; ++i)
         {
             list.Add(new Lilium.Controls.EntityMaterialSlot(this, i));
         }
     }
     if (SkinnedMesh != null)
     {
         for (int i = 0; i < SkinnedMesh.submeshes.Count; ++i)
         {
             list.Add(new Lilium.Controls.EntityMaterialSlot(this, i));
         }
     }
     controls = list.ToArray();
 }
예제 #2
0
파일: Mesh.cs 프로젝트: woncomp/LiliumLab
 void CreateControls()
 {
     List<Lilium.Controls.Control> list = new List<Controls.Control>();
     if (true)
     {
         var toggle = new Lilium.Controls.Toggle("Draw TBN", () => Config.DrawTBN, val => Config.DrawTBN = val);
         list.Add(toggle);
         var slider = new Lilium.Controls.Slider("Draw TBN Offset", 0, 2, () => Config.TBNOffset, val => Config.TBNOffset = val);
         list.Add(slider);
     }
     if (true)
     {
         var toggle = new Lilium.Controls.Toggle("Draw Wireframe", () => Config.DrawWireframe, val => Config.DrawWireframe = val);
         list.Add(toggle);
     }
     controls = list.ToArray();
 }
예제 #3
0
파일: Camera.cs 프로젝트: woncomp/LiliumLab
        void CreateControls()
        {
            var cameraInfo = new Lilium.Controls.Label("Camera Pos", () => Position.ToString("0.000"));
            var button = new Lilium.Controls.Button("Front", () =>
            {
                CameraYaw = 0;
                CameraPitch = 0;
            });
            var sliderx = new Lilium.Controls.Slider("Focus Point X", -10, 10, () => FocusPoint.X, val => FocusPoint.X = val);
            var slidery = new Lilium.Controls.Slider("Focus Point Y", -10, 10, () => FocusPoint.Y, val => FocusPoint.Y = val);
            var sliderz = new Lilium.Controls.Slider("Focus Point Z", -10, 10, () => FocusPoint.Z, val => FocusPoint.Z = val);

            //var clearColor = new Lilium.Controls.ColorPicker("Clear Color", () => ClearColor.ToVector4(), val => ClearColor = new Color(val));
            var sky1 = new Lilium.Controls.ColorPicker("Sky Bottom", () => SkyBottomColor, val => SkyBottomColor = val);
            var sky2 = new Lilium.Controls.ColorPicker("Sky Top", () => SkyTopColor, val => SkyTopColor = val);

            controls = new Controls.Control[] { cameraInfo, button, sliderx, slidery, sliderz, sky1, sky2 };
        }
예제 #4
0
파일: Light.cs 프로젝트: woncomp/LiliumLab
 void CreateControls()
 {
     var lightInfo = new Lilium.Controls.Label("Light Dir", () => LightDirection.ToString("0.000"));
     var lightSlider = new Lilium.Controls.Slider("Light Distance", 1, 100, () => LightDistance, val => LightDistance = val);
     var lightToggle = new Lilium.Controls.Toggle("Draw Light", () => DrawLight, val => DrawLight = val);
     var ambient = new Lilium.Controls.ColorPicker("Ambient Color", () => AmbientColor, val => AmbientColor = val);
     var diffuse = new Lilium.Controls.ColorPicker("Diffuse Color", () => DiffuseColor, val => DiffuseColor = val);
     controls = new Controls.Control[] { lightInfo, lightSlider, lightToggle, ambient, diffuse };
 }