예제 #1
0
        public MyGuiScreenGameChat(bool sendToTeam)
            : base(Vector2.Zero, null, null)
        {
            m_closeOnEsc = true;
            m_enableBackgroundFade = true;
            m_teamOnly = sendToTeam;

            m_positionOffset = new Vector2(MyGuiManager.GetNormalizedCoordinateFromScreenCoordinate_FULLSCREEN(new Vector2(0, 0)).X - 920/1920f/2 - 0.04f, -0.2f);

            m_panelTexture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\BackgroundScreen\\ChatBackground", flags: TextureFlags.IgnoreQuality);

            MyGuiControlPanel panel = new MyGuiControlPanel(this, new Vector2(0.5f, 0.85f) + m_positionOffset, new Vector2(920 / 1920f, 388 / 1200f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, m_panelTexture, null, null, null, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_TOP);
            Controls.Add(panel);

            Vector2 menuPositionOrigin = new Vector2(0.423f, 0.939f) + m_positionOffset;
            Vector2 delta = new Vector2(0.17f, 0f);
            const MyGuiControlButtonTextAlignment menuButtonTextAlignement = MyGuiControlButtonTextAlignment.CENTERED;

            m_textbox = new MyGuiControlTextbox(this, menuPositionOrigin, MyGuiControlPreDefinedSize.MEDIUM, "", MyGuiConstants.CHAT_WINDOW_MAX_MESSAGE_LENGTH, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE * 0.75f, MyGuiControlTextboxType.NORMAL, true, false);
            Controls.Add(m_textbox);

            Controls.Add(new MyGuiControlButton(this, menuPositionOrigin + delta,
                MyGuiConstants.MAIN_MENU_BUTTON_SIZE * new Vector2(0.41f, 0.78f), MyGuiConstants.BUTTON_BACKGROUND_COLOR, MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\ButtonChatEnter", flags: TextureFlags.IgnoreQuality), null, null,
                sendToTeam ? MyTextsWrapperEnum.SendToTeam : MyTextsWrapperEnum.SendToAll, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE * 0.65f,
                menuButtonTextAlignement, OnSendClick, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER,
                true, true, MyGuiControlHighlightType.WHEN_ACTIVE));
        }
예제 #2
0
        public MyGuiScreenInventory(List<MySmallShipBuilderWithName> smallShipsBuilders, int currentShipBuilderIndex, float money, bool tradeForMoney,
            MyMwcObjectBuilder_Inventory otherSidesInventoryBuilder, StringBuilder otherSideInventoryName, MyGuiScreenInventoryType inventoryScreenType, bool resetWasAnythingTrasferedAfterComboboxChanged = false)
            : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(1.0f, 1.0f), true, MyGuiManager.GetInventoryScreenBackgroundTexture())
        {
            ScreenTimeout = TimeSpan.MaxValue;
            m_isInventoryLocked = true;
            m_resetWasAnythingTrasferedAfterComboboxChanged = resetWasAnythingTrasferedAfterComboboxChanged;
            m_isTransferingInProgress = false;
            m_wasAnythingTrasfered = false;

            m_smallShipsBuilders = smallShipsBuilders;
            m_smallShipsInventoryItemIDs = new List<MySmallShipInventoryItemIDs>(smallShipsBuilders.Count);
            m_currentShipBuilderIndex = currentShipBuilderIndex;
            m_otherSideInventoryBuilder = otherSidesInventoryBuilder;
            if (m_otherSideInventoryBuilder != null)
            {
                m_otherSideInventoryItemIDs = new List<int>();
            }
            m_shipInventoryHideList = new List<int>();
            m_otherSideInventoryHideList = new List<int>();
            m_tradeForMoney = tradeForMoney;
            m_inventoryScreenType = inventoryScreenType;

            m_itemsRepository = new MyInventoryItemsRepository();
            m_removedInventoryItemIDs = new List<int>();

            LoadInventoryItemsFromObjectBuilders();

            if (m_inventoryScreenType == MyGuiScreenInventoryType.GodEditor)
            {
                AddCaption(MyTextsWrapperEnum.ShipCustomizationCaption, new Vector2(0, 0.005f));
            }
            else
            {
                AddCaption(MyTextsWrapperEnum.ShipInventoryCaption, new Vector2(0, 0.005f));
            }
            m_enableBackgroundFade = false;
            m_backgroundFadeColor = Vector4.Zero;

            OnEnterCallback += OnOkClickDelegate;

            m_shipTexture = GetShipTexture();
            m_shipPanel = new MyGuiControlPanel(this, new Vector2(0.005f, -0.2347f), new Vector2(480 / 1600f, 367 / 1200f), MyGuiConstants.SCREEN_BACKGROUND_COLOR,
                    m_shipTexture, null, null, null,
                    MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
            Controls.Add(m_shipPanel);

            InitControls(otherSideInventoryName);

            FillOtherSideInventoryListbox();
            FillShipCustomizationListboxes(m_currentShipBuilderIndex);
            FillShipsCombobox();
            SwitchToShip(m_currentShipBuilderIndex);

            SetMoney(money);
            if (m_tradeForMoney) 
            {
                UpdateOtherSideInventoryListboxForTrading();
            }
            MyAudio.AddCue2D(MySoundCuesEnum.GuiWheelControlOpen);
        }
        protected virtual void CreateControls()
        {            
            CreateButtons();                     
            var screenZero = MyGuiManager.GetNormalizedCoordinateFromScreenCoordinate_FULLSCREEN(new Vector2(0, 0));
            var screenMax = MyGuiManager.GetNormalizedCoordinateFromScreenCoordinate_FULLSCREEN(new Vector2(MyMinerGame.ScreenSize.X, MyMinerGame.ScreenSize.Y));

            var textBoxSize = MyGuiConstants.TEXTBOX_MEDIUM_SIZE + new Vector2(30f / 1600f,0);
            var treeViewSize = new Vector2(textBoxSize.X, screenMax.Y - (MyGuiConstants.TOOLBAR_PADDING.Y * 6 + textBoxSize.Y + MyGuiConstants.TOOLBAR_BUTTON_SIZE.Y));
            var panelSize = treeViewSize + new Vector2(MyGuiConstants.TOOLBAR_PADDING.X * 2, MyGuiConstants.TOOLBAR_PADDING.Y * 3) + new Vector2(0, textBoxSize.Y);

            var textBoxPosition = screenZero + new Vector2(MyGuiConstants.TOOLBAR_PADDING.Y * 2, MyGuiConstants.TOOLBAR_PADDING.Y * 3 + MyGuiConstants.TOOLBAR_BUTTON_SIZE.Y);
            var treeViewPosition = textBoxPosition + new Vector2(0, textBoxSize.Y + MyGuiConstants.TOOLBAR_PADDING.Y);
            var panelPosition = textBoxPosition - new Vector2(MyGuiConstants.TOOLBAR_PADDING.Y, MyGuiConstants.TOOLBAR_PADDING.Y);

            // Add treeview and add button panel
            m_controlPanel = new MyGuiControlPanel(m_parentScreen,
                    panelPosition + panelSize / 2,
                    panelSize,
                    MyGuiConstants.TREEVIEW_BACKGROUND_COLOR,
                    null, null, null, null,
                    MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER);
            m_editorControls.Add(m_controlPanel);

            m_addObjectTreeViewdragDrop = new MyTreeViewItemDragAndDrop(m_parentScreen);
            m_addObjectTreeViewdragDrop.Drop = OnDragDrop;

            // Add object treeView
            m_addObjectTreeView = new MyGuiControlTreeView(
                m_parentScreen,
                treeViewPosition + treeViewSize / 2,
                treeViewSize,
                MyGuiConstants.TREEVIEW_BACKGROUND_COLOR, 
                false);
            m_editorControls.Add(m_addObjectTreeView);

            // Add treeView filter textBox
            m_filterTextbox = new MyGuiControlTextbox(m_parentScreen,
                textBoxPosition + textBoxSize / 2,
                MyGuiControlPreDefinedSize.MEDIUM,
                string.Empty, 80,
                MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiControlTextboxType.NORMAL, false);
            m_editorControls.Add(m_filterTextbox);
            MyGuiScreenGamePlay.Static.SetControlIndex(1);

            // Dragdrop Control must be last (draw over other controls)
            m_editorControls.Add(m_addObjectTreeViewdragDrop);

            Vector2 editVoxelHandPanelSize = new Vector2(panelSize.X * 1.4f, panelSize.Y);
            m_editVoxelHand = new MyGuiControlEditVoxelHand(m_parentScreen, panelPosition + editVoxelHandPanelSize / 2f, editVoxelHandPanelSize, MyGuiConstants.TREEVIEW_BACKGROUND_COLOR);
            m_editorControls.Add(m_editVoxelHand);

            Vector2 editLightsSize = new Vector2(0.48f, 0.925f);
            m_editLights = new MyGuiControlEditLights(m_parentScreen, panelPosition + editLightsSize / 2, editLightsSize, MyGuiConstants.TREEVIEW_BACKGROUND_COLOR);
            m_editorControls.Add(m_editLights);
            m_editLights.Visible = false;
            foreach (MyGuiControlBase control in m_editorControls)
            {
                control.DrawWhilePaused = false;
            }
        }
        void CreateControls(Vector2 controlsOrigin)
        {
            var panel = new MyGuiControlPanel(m_parent, m_position, m_size, m_backgroundColor.Value, 2, m_backgroundColor.Value * 2f);
            m_controls.Add(panel);

            float dPos = -1;
            float dPosFalloff;
            MyTextsWrapperEnum[] colorNames = { MyTextsWrapperEnum.Red, MyTextsWrapperEnum.Green, MyTextsWrapperEnum.Blue };

            Vector2 sliderOffset = new Vector2(0.21f, 0f);

            float buttonsY = m_size.Value.Y / 2.0f - MyGuiConstants.MESSAGE_BOX_BORDER_AREA_Y - MyGuiConstants.MESSAGE_BOX_BUTTON_SIZE.Y / 2.0f;

            AddControl(true, new MyGuiControlButton(m_parent, new Vector2(m_position.X, controlsOrigin.Y) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.MAIN_MENU_BUTTON_SIZE, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.SwitchToSpotLight, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, OnSpotClick,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true));
            ++dPos;

            m_controls.Add(new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, MyTextsWrapperEnum.EachlightHasInternallyTwoLightsPointAndSpot, MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            /*
             * 
             * Point light
             * 
             * 
             */
            // Checkboxes for Disabled/Point/Hemisphere

            Vector2 checkBoxOffset = new Vector2(0.14f, 0);
            dPos++;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Point enabled"), MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_pointLightCheckbox = new MyGuiControlCheckbox(m_parent, (checkBoxOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, false, MyGuiConstants.CHECKBOX_BACKGROUND_COLOR);
            AddControl(true, m_pointLightCheckbox);

            //dPos++;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + new Vector2(0.2f, 0), null, new StringBuilder("Hemispheric enabled"), MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_hemisphereLightCheckbox = new MyGuiControlCheckbox(m_parent, (checkBoxOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA + new Vector2(0.26f, 0), false, MyGuiConstants.CHECKBOX_BACKGROUND_COLOR);
            AddControl(true, m_hemisphereLightCheckbox);

            //text
            dPos += 0.9f;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, MyTextsWrapperEnum.DiffuseColor, MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            Vector2 buttonsColumn = new Vector2(0.165f, 0.0025f);
            Vector2 copyPasteButtonScale = MyGuiConstants.MESSAGE_BOX_BUTTON_SIZE * new Vector2(0.7f, 0.7f);
            float copyPasteButtonFontScale = MyGuiConstants.BUTTON_TEXT_SCALE * 0.75f;
            Vector2 pasteButtonShift = new Vector2(0.115f, 0f);            

            AddControl(true, new MyGuiControlButton(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + buttonsColumn, copyPasteButtonScale, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Copy, MyGuiConstants.BUTTON_TEXT_COLOR, copyPasteButtonFontScale, OnCopyPointDiffuseColor,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));

            AddControl(true, new MyGuiControlButton(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + buttonsColumn + pasteButtonShift, copyPasteButtonScale, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Paste, MyGuiConstants.BUTTON_TEXT_COLOR, copyPasteButtonFontScale, OnPastePointDiffuseColor,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));
            dPos += 0.1f;

            //point color sliders
            for (int i = 0; i < 3; i++)
            {
                dPos += 0.75f;
                AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, colorNames[i], MyGuiConstants.LABEL_TEXT_COLOR,
                    MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
                m_pointNormalLightColorSlider[i] = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                    MyEditorConstants.COLOR_COMPONENT_MIN_VALUE, MyEditorConstants.COLOR_COMPONENT_MAX_VALUE, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                    new StringBuilder(), MyGuiConstants.SLIDER_WIDTH_LABEL, 0, MyGuiConstants.LABEL_TEXT_SCALE * 0.85f * 0.75f);
                AddControl(true, m_pointNormalLightColorSlider[i]);
            }

            //text
            dPos += 0.9f;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, MyTextsWrapperEnum.SpecularColor, MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            AddControl(true, new MyGuiControlButton(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + buttonsColumn, copyPasteButtonScale, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Copy, MyGuiConstants.BUTTON_TEXT_COLOR, copyPasteButtonFontScale, OnCopyPointSpecularColor,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));

            AddControl(true, new MyGuiControlButton(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + buttonsColumn + pasteButtonShift, copyPasteButtonScale, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Paste, MyGuiConstants.BUTTON_TEXT_COLOR, copyPasteButtonFontScale, OnPastePointSpecularColor,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));
            dPos += 0.1f;

            // specular color sliders
            for (int i = 0; i < 3; i++)
            {
                dPos += 0.75f;
                AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, colorNames[i], MyGuiConstants.LABEL_TEXT_COLOR,
                    MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
                m_specularLightColorSlider[i] = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                    MyEditorConstants.COLOR_COMPONENT_MIN_VALUE, MyEditorConstants.COLOR_COMPONENT_MAX_VALUE, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                    new StringBuilder(), MyGuiConstants.SLIDER_WIDTH_LABEL, 0, MyGuiConstants.LABEL_TEXT_SCALE * 0.85f * 0.75f);
                AddControl(true, m_specularLightColorSlider[i]);
            }

            /*
             * Effect 
             */

            //effect
            dPos += 1.25f;
            m_controls.Add( new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, MyTextsWrapperEnum.Options, MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_effectComboBox = new MyGuiControlCombobox(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + sliderOffset + new Vector2(0.03f, 0f),
                MyGuiControlPreDefinedSize.MEDIUM, MyGuiConstants.COMBOBOX_BACKGROUND_COLOR, MyGuiConstants.COMBOBOX_TEXT_SCALE);

            foreach (MyLightEffectTypeEnum enumValue in Enum.GetValues(typeof(MyLightEffectTypeEnum)))
            {
                m_effectComboBox.AddItem((int)enumValue, MyPrefabLight.GetStringFromMyLightEffectTypeEnum(enumValue));
            }

            m_effectComboBox.SelectItemByKey(0);
            m_effectComboBox.OnSelect += OnComboBoxChange;
            //m_controls.Add(m_effectComboBox);
            m_controls.Add(m_effectComboBox);

            //falloff slider
            dPos += 1.25f;
            dPosFalloff = dPos;

            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Falloff"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_pointFallOffSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.1f, 5.0f, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(true, m_pointFallOffSlider);

            //range slider
            dPos++;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Range"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_pointRangeSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.1f, MyLightsConstants.MAX_POINTLIGHT_RADIUS, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(true, m_pointRangeSlider);

            //intensity slider
            dPos++;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Intensity"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            m_pointIntensitySlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.1f, 10.0f, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);

            AddControl(true, m_pointIntensitySlider);

            // Offset slider
            dPos++;
            AddControl(true, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Offset"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            m_pointOffsetSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                -0.5f, 1.5f, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);

            AddControl(true, m_pointOffsetSlider);


            dPos++;
            AddControl(true, m_flashOffsetLabel = new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Flash Ofst."), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            m_flashOffsetSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0f, 1f, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);

            AddControl(true, m_flashOffsetSlider);

            /*
             * 
             * Reflector spot light
             * 
             * 
             */




            dPos = -1;



            AddControl(false, new MyGuiControlButton(m_parent, new Vector2(m_position.X, controlsOrigin.Y) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.MAIN_MENU_BUTTON_SIZE, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.SwitchToPointLight, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, OnPointClick,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, true));


            dPos = 1;

            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, MyTextsWrapperEnum.Enabled, MyGuiConstants.LABEL_TEXT_COLOR,
    MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_spotLightCheckbox = new MyGuiControlCheckbox(m_parent, (checkBoxOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, false, MyGuiConstants.CHECKBOX_BACKGROUND_COLOR);
            AddControl(false, m_spotLightCheckbox);





            //text
            dPos += 0.9f;
            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, MyTextsWrapperEnum.DiffuseColor, MyGuiConstants.LABEL_TEXT_COLOR,
                MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));

            AddControl(false, new MyGuiControlButton(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + buttonsColumn, copyPasteButtonScale, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Copy, MyGuiConstants.BUTTON_TEXT_COLOR, copyPasteButtonFontScale, OnCopySpotDiffuseColor,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));

            AddControl(false, new MyGuiControlButton(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA + buttonsColumn + pasteButtonShift, copyPasteButtonScale, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Paste, MyGuiConstants.BUTTON_TEXT_COLOR, copyPasteButtonFontScale, OnPasteSpotDiffuseColor,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));
            dPos += 0.1f;

            //color sliders
            for (int i = 0; i < 3; i++)
            {
                dPos += 0.75f;
                AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, colorNames[i], MyGuiConstants.LABEL_TEXT_COLOR,
                    MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
                m_spotNormalLightColorSlider[i] = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                    MyEditorConstants.COLOR_COMPONENT_MIN_VALUE, MyEditorConstants.COLOR_COMPONENT_MAX_VALUE, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                    new StringBuilder(), MyGuiConstants.SLIDER_WIDTH_LABEL, 0, MyGuiConstants.LABEL_TEXT_SCALE * 0.85f * 0.75f);
                AddControl(false, m_spotNormalLightColorSlider[i]);
            }


            dPos++;


            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Shadows Distance"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            dPos++;
            m_spotLightShadowDistance = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.0f, MyLightsConstants.MAX_SPOTLIGHT_SHADOW_RANGE, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(false, m_spotLightShadowDistance);


            //angle slider
            dPos = dPosFalloff;
            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Angle"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_spotAngleSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.1f, MyLightsConstants.MAX_SPOTLIGHT_ANGLE, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(false, m_spotAngleSlider);

            //falloff slider
            dPos++;
            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Falloff"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_spotFallOffSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.1f, 5.0f, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(false, m_spotFallOffSlider);

            //range slider
            dPos++;
            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Range"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_spotRangeSlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                 0.1f, MyLightsConstants.MAX_SPOTLIGHT_RANGE, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(false, m_spotRangeSlider);

            //intensity slider
            dPos++;
            AddControl(false, new MyGuiControlLabel(m_parent, controlsOrigin + dPos * MyGuiConstants.CONTROLS_DELTA, null, new StringBuilder("Intensity"), MyGuiConstants.LABEL_TEXT_COLOR, MyGuiConstants.LABEL_TEXT_SCALE, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER));
            m_spotIntensitySlider = new MyGuiControlSlider(m_parent, (sliderOffset + controlsOrigin) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.SLIDER_WIDTH,
                0.1f, 10.0f, MyGuiConstants.SLIDER_BACKGROUND_COLOR,
                new System.Text.StringBuilder(" {0}"), MyGuiConstants.SLIDER_WIDTH_LABEL + 0.05f, 3, MyGuiConstants.LABEL_TEXT_SCALE);
            AddControl(false, m_spotIntensitySlider);

            dPos = 15;
            m_controls.Add(new MyGuiControlButton(m_parent, new Vector2(m_position.X - 0.05f, controlsOrigin.Y) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.MESSAGE_BOX_BUTTON_SIZE, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Ok, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, OnOkClick,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_RIGHT_AND_VERTICAL_CENTER, true));

            m_controls.Add(new MyGuiControlButton(m_parent, new Vector2(m_position.X + 0.05f, controlsOrigin.Y) + dPos * MyGuiConstants.CONTROLS_DELTA, MyGuiConstants.MESSAGE_BOX_BUTTON_SIZE, MyGuiConstants.BUTTON_BACKGROUND_COLOR,
                MyTextsWrapperEnum.Cancel, MyGuiConstants.BUTTON_TEXT_COLOR, MyGuiConstants.BUTTON_TEXT_SCALE, OnCancelClick,
                MyGuiControlButtonTextAlignment.CENTERED, true, MyGuiDrawAlignEnum.HORISONTAL_LEFT_AND_VERTICAL_CENTER, true));



            ActivateLightType(true);
            //m_tabControl.ActivateTab((int)MyGuiLightPrefabTypeEnum.PointLight);
        }