Exemple #1
0
            public void DoUI(IObjectUIControl control)
            {
                obj.mName = control.FullWidthTextInput(obj.mName, "Camera Name");
                obj.mType = control.DropDownTextInput("Camera Type", obj.mEntry.Get <string>("camtype"), cameraTypes, false);

                control.VerticalSeperator();
                control.Spacing(2);
                obj.mFields["woffset.X"] = control.NumberInput((float)obj.mFields["woffset.X"], "World Offset X");
                obj.mFields["woffset.Y"] = control.NumberInput((float)obj.mFields["woffset.Y"], "World Offset Y");
                obj.mFields["woffset.Z"] = control.NumberInput((float)obj.mFields["woffset.Z"], "World Offset Z");

                obj.mFields["loffset"]  = control.NumberInput((float)obj.mFields["loffset"], "loffset");
                obj.mFields["loffsetv"] = control.NumberInput((float)obj.mFields["loffsetv"], "loffsetv");
                obj.mFields["roll"]     = control.NumberInput((float)obj.mFields["roll"], "roll");
                obj.mFields["fovy"]     = control.NumberInput((float)obj.mFields["fovy"], "fovy");
                obj.mFields["camint"]   = Convert.ToInt32(control.NumberInput((int)obj.mFields["camint"], "camint"));
                obj.mFields["upper"]    = control.NumberInput((float)obj.mFields["upper"], "upper");
                obj.mFields["lower"]    = control.NumberInput((float)obj.mFields["lower"], "lower");

                obj.mFields["gndint"] = Convert.ToInt32(control.NumberInput((int)obj.mFields["gndint"], "gndint"));
                obj.mFields["uplay"]  = control.NumberInput((float)obj.mFields["uplay"], "uplay");
                obj.mFields["lplay"]  = control.NumberInput((float)obj.mFields["lplay"], "lplay");

                obj.mFields["pushdelay"]    = Convert.ToInt32(control.NumberInput((int)obj.mFields["pushdelay"], "pushdelay"));
                obj.mFields["pushdelaylow"] = Convert.ToInt32(control.NumberInput((int)obj.mFields["pushdelaylow"], "pushdelaylow"));

                obj.mFields["udown"]   = Convert.ToInt32(control.NumberInput((int)obj.mFields["udown"], "udown"));
                obj.mFields["vpanuse"] = Convert.ToInt32(control.NumberInput((int)obj.mFields["vpanuse"], "vpanuse"));

                obj.mFields["vpanaxis.X"] = control.NumberInput((float)obj.mFields["vpanaxis.X"], "Pan Axis X");
                obj.mFields["vpanaxis.Y"] = control.NumberInput((float)obj.mFields["vpanaxis.Y"], "Pan Axis Y");
                obj.mFields["vpanaxis.Z"] = control.NumberInput((float)obj.mFields["vpanaxis.Z"], "Pan Axis Z");
            }
Exemple #2
0
            public void DoUI(IObjectUIControl control)
            {
#if ODYSSEY
                control.PlainText(Convert.ToString(area.ScenarioBitField, 2));
#endif
                if (Spotlight.Properties.Settings.Default.AllowIDEdits)
                {
                    area.ID = control.TextInput(area.ID, "Object ID");
                }
                else
                {
                    control.TextInput(area.ID, "Object ID");
                }

                if (area.comment != null)
                {
                    control.TextInput(area.comment, "Comment");
                }

                area.Layer = control.TextInput(area.Layer, "Layer");

                area.ClassName = control.DropDownTextInput("Class Name", area.ClassName, DB_classNames);
                area.ModelName = control.DropDownTextInput("Shape Name", area.ModelName, shapeNames, false);

                area.Priority = (int)control.NumberInput(area.Priority, "Priority");

                control.VerticalSeperator();

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    area.Position = control.Vector3Input(area.Position, "Position", 1, 16);
                }
                else
                {
                    area.Position = control.Vector3Input(area.Position, "Position", 0.125f, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    area.Rotation = control.Vector3Input(area.Rotation, "Rotation", 45, 18);
                }
                else
                {
                    area.Rotation = control.Vector3Input(area.Rotation, "Rotation", 5, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    area.Scale = control.Vector3Input(area.Scale, "Scale", 1, 16);
                }
                else
                {
                    area.Scale = control.Vector3Input(area.Scale, "Scale", 0.125f, 2);
                }
            }
Exemple #3
0
            public void DoUI(IObjectUIControl control)
            {
                text     = control.TextInput(text, "TextInput");
                longText = control.FullWidthTextInput(longText, "Long Text Input");
                number   = control.NumberInput(number, "Number Input");
                control.Link("Just some Link");

                control.DoubleButton("Add", "Remove");
                control.TripleButton("Add", "Remove", "Insert");
                control.QuadripleButton("+", "-", "*", "/");
                enemyType  = (EnemyType)control.ChoicePicker("Enemy1 Type", enemyType, Enum.GetValues(typeof(EnemyType)));
                enemyType2 = (EnemyType)control.ChoicePicker("Enemy2 Type", enemyType2, Enum.GetValues(typeof(EnemyType)));
                control.VerticalSeperator();
                objectType = control.AdvancedTextInput("Object Type", objectType, objectTypes);

                control.Spacing(30);
                control.PlainText("Some Text");
            }
            public void DoUI(IObjectUIControl control)
            {
#if ODYSSEY
                control.PlainText(Convert.ToString(obj.ScenarioBitField, 2));
#endif
                if (Spotlight.Properties.Settings.Default.AllowIDEdits)
                {
                    obj.ID = control.TextInput(obj.ID, "Object ID");
                }
                else
                {
                    control.TextInput(obj.ID, "Object ID");
                }

                if (obj.comment != null)
                {
                    control.TextInput(obj.comment, "Comment");
                }

                obj.Layer      = control.TextInput(obj.Layer, "Layer");
                obj.ObjectName = control.DropDownTextInput("Object Name", obj.ObjectName, DB_objectNames);

                if (showClassNameInfo)
                {
                    control.SetTooltip(classNameInfo);
                }
                obj.ClassName = control.DropDownTextInput("Class Name", obj.ClassName, DB_classNames);
                if (showClassNameAlias)
                {
                    control.PlainText(classNameAlias);
                }
                control.SetTooltip(null);

                obj.ModelName = control.DropDownTextInput("Model Name", obj.ModelName, DB_modelNames);

                control.VerticalSeperator();

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.Position = control.Vector3Input(obj.Position, "Position", 1, 16);
                }
                else
                {
                    obj.Position = control.Vector3Input(obj.Position, "Position", 0.125f, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.Rotation = control.Vector3Input(obj.Rotation, "Rotation", 45, 18);
                }
                else
                {
                    obj.Rotation = control.Vector3Input(obj.Rotation, "Rotation", 5, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.Scale = control.Vector3Input(obj.Scale, "Scale", 1, 16);
                }
                else
                {
                    obj.Scale = control.Vector3Input(obj.Scale, "Scale", 0.125f, 2);
                }

                control.VerticalSeperator();

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.DisplayTranslation = control.Vector3Input(obj.DisplayTranslation, "Display Position", 1, 16);
                }
                else
                {
                    obj.DisplayTranslation = control.Vector3Input(obj.DisplayTranslation, "Display Position", 0.125f, 2);
                }

                //TODO
            }
Exemple #5
0
            public void DoUI(IObjectUIControl control)
            {
                if (SpotLight.Properties.Settings.Default.AllowIDEdits)
                {
                    obj.ID = control.TextInput(obj.ID, "Object ID");
                }
                else
                {
                    control.TextInput(obj.ID, "Object ID");
                }

                obj.ObjectName = control.TextInput(obj.ObjectName, "Object Name");
                obj.ClassName  = control.TextInput(obj.ClassName, "Class Name");
                obj.ModelName  = control.TextInput(obj.ModelName, "Model Name");

                control.VerticalSeperator();

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.Position = control.Vector3Input(obj.Position, "Position", 1, 16);
                }
                else
                {
                    obj.Position = control.Vector3Input(obj.Position, "Position", 0.125f, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.Rotation = control.Vector3Input(obj.Rotation, "Rotation", 45, 18);
                }
                else
                {
                    obj.Rotation = control.Vector3Input(obj.Rotation, "Rotation", 5, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.Scale = control.Vector3Input(obj.Scale, "Scale", 1, 16);
                }
                else
                {
                    obj.Scale = control.Vector3Input(obj.Scale, "Scale", 0.125f, 2);
                }

                control.VerticalSeperator();

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.DisplayTranslation = control.Vector3Input(obj.DisplayTranslation, "Display Position", 1, 16);
                }
                else
                {
                    obj.DisplayTranslation = control.Vector3Input(obj.DisplayTranslation, "Display Position", 0.125f, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.DisplayRotation = control.Vector3Input(obj.DisplayRotation, "Display Rotation", 45, 18);
                }
                else
                {
                    obj.DisplayRotation = control.Vector3Input(obj.DisplayRotation, "Display Rotation", 5, 2);
                }

                if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftShift))
                {
                    obj.DisplayScale = control.Vector3Input(obj.DisplayScale, "Display Scale", 1, 16);
                }
                else
                {
                    obj.DisplayScale = control.Vector3Input(obj.DisplayScale, "Display Scale", 0.125f, 2);
                }
            }