예제 #1
0
 // with delegate for indexed onButtonClick
 public MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2?size, Vector4 backgroundColor, MyTextsWrapperEnum textEnum,
                           Vector4 textColor, float textScale, OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, MyGuiControlButtonTextAlignment textAlignment, bool canHandleKeyboardInput,
                           MyGuiDrawAlignEnum align, bool implementedFeature)
     : this(parent, position, size, backgroundColor, MyTextsWrapper.Get(textEnum), textColor, textScale, onIndexedButtonClick, buttonIndex,
            textAlignment, canHandleKeyboardInput, align, null, implementedFeature)
 {
 }
예제 #2
0
 //  Base constructor with delegate for indexed onButtonClick and tooltip
 private MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2?size, Vector4 backgroundColor,
                            OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, bool canHandleKeyboardInput, MyGuiDrawAlignEnum align, StringBuilder toolTip, bool implementedFeature, bool canHandleKeyboardActiveControl)
     : base(parent, MyGuiManager.GetAlignedCoordinate(position, size.Value, align) + new Vector2(size.Value.X / 2.0f, size.Value.Y / 2.0f), size, backgroundColor, toolTip)
 {
     m_canHandleKeyboardActiveControl = canHandleKeyboardActiveControl;
     m_onIndexedButtonClick           = onIndexedButtonClick;
     m_buttonIndex            = buttonIndex;
     m_canHandleKeyboardInput = canHandleKeyboardInput;
     m_implementedFeature     = implementedFeature;
 }
예제 #3
0
 //  Text constructor with delegate for indexed onButtonClick
 public MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2?size, Vector4 backgroundColor, StringBuilder text,
                           Vector4 textColor, float textScale, OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, MyGuiControlButtonTextAlignment textAlignement, bool canHandleKeyboardInput,
                           MyGuiDrawAlignEnum align, StringBuilder tooltip, bool implementedFeature)
     : this(parent, position, size, backgroundColor, onIndexedButtonClick, buttonIndex, canHandleKeyboardInput, align, tooltip, implementedFeature, true)
 {
     m_textColor     = textColor;
     Text            = text;
     m_textScale     = textScale;
     m_textAlignment = textAlignement;
 }
예제 #4
0
 //  Base constructor with delegate for indexed onButtonClick
 private MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2?size, Vector4 backgroundColor,
                            MyTexture2D buttonTexture, MyTexture2D hoverButtonTexture, MyTexture2D pressedButtonTexture,
                            OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, bool canHandleKeyboardInput, MyGuiDrawAlignEnum align, bool implementedFeature, bool canHandleKeyboardActiveControl)
     : base(parent, MyGuiManager.GetAlignedCoordinate(position, size.Value, align) + new Vector2(size.Value.X / 2.0f, size.Value.Y / 2.0f), size, backgroundColor, null,
            buttonTexture, hoverButtonTexture, pressedButtonTexture, true)
 {
     m_canHandleKeyboardActiveControl = canHandleKeyboardActiveControl;
     m_onIndexedButtonClick           = onIndexedButtonClick;
     m_buttonIndex            = buttonIndex;
     m_canHandleKeyboardInput = canHandleKeyboardInput;
     m_implementedFeature     = implementedFeature;
 }
예제 #5
0
 //  Base constructor with delegate for indexed onButtonClick and tooltip
 private MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2? size, Vector4 backgroundColor,
     OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, bool canHandleKeyboardInput, MyGuiDrawAlignEnum align, StringBuilder toolTip, bool implementedFeature, bool canHandleKeyboardActiveControl)
     : base(parent, MyGuiManager.GetAlignedCoordinate(position, size.Value, align) + new Vector2(size.Value.X / 2.0f, size.Value.Y / 2.0f), size, backgroundColor, toolTip)
 {
     m_canHandleKeyboardActiveControl = canHandleKeyboardActiveControl;
     m_onIndexedButtonClick = onIndexedButtonClick;
     m_buttonIndex = buttonIndex;
     m_canHandleKeyboardInput = canHandleKeyboardInput;
     m_implementedFeature = implementedFeature;
 }
예제 #6
0
 //  Base constructor with delegate for indexed onButtonClick
 private MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2? size, Vector4 backgroundColor,
      MyTexture2D buttonTexture, MyTexture2D hoverButtonTexture, MyTexture2D pressedButtonTexture,
     OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, bool canHandleKeyboardInput, MyGuiDrawAlignEnum align, bool implementedFeature, bool canHandleKeyboardActiveControl)
     : base(parent, MyGuiManager.GetAlignedCoordinate(position, size.Value, align) + new Vector2(size.Value.X / 2.0f, size.Value.Y / 2.0f), size, backgroundColor, null,
      buttonTexture, hoverButtonTexture, pressedButtonTexture, true)
 {
     m_canHandleKeyboardActiveControl = canHandleKeyboardActiveControl;
     m_onIndexedButtonClick = onIndexedButtonClick;
     m_buttonIndex = buttonIndex;
     m_canHandleKeyboardInput = canHandleKeyboardInput;
     m_implementedFeature = implementedFeature;
 }
예제 #7
0
 //  Text constructor with delegate for indexed onButtonClick
 public MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2? size, Vector4 backgroundColor, StringBuilder text,
     Vector4 textColor, float textScale, OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, MyGuiControlButtonTextAlignment textAlignement, bool canHandleKeyboardInput,
     MyGuiDrawAlignEnum align, StringBuilder tooltip, bool implementedFeature)
     : this(parent, position, size, backgroundColor, onIndexedButtonClick, buttonIndex, canHandleKeyboardInput, align, tooltip, implementedFeature, true)
 {
     m_textColor = textColor;
     Text = text;
     m_textScale = textScale;
     m_textAlignment = textAlignement;
 }
예제 #8
0
 // with delegate for indexed onButtonClick
 public MyGuiControlButton(IMyGuiControlsParent parent, Vector2 position, Vector2? size, Vector4 backgroundColor, MyTextsWrapperEnum textEnum,
     Vector4 textColor, float textScale, OnIndexedButtonClick onIndexedButtonClick, int buttonIndex, MyGuiControlButtonTextAlignment textAlignment, bool canHandleKeyboardInput,
     MyGuiDrawAlignEnum align, bool implementedFeature)
     : this(parent, position, size, backgroundColor, MyTextsWrapper.Get(textEnum), textColor, textScale, onIndexedButtonClick, buttonIndex,
     textAlignment, canHandleKeyboardInput, align, null, implementedFeature)
 {
 }