private string _fontFamily;
private string _fontStyle;
private int _pointSize;
- private Vector4 _textColor;
- private Vector4 _textBackgroundColor;
+ private Color _textColor;
+ private Color _textBackgroundColor;
private int _maxTextLength;
public Spin() : base(ViewWrapperImpl.CustomViewBehaviour.REQUIRES_KEYBOARD_NAVIGATION_SUPPORT | ViewWrapperImpl.CustomViewBehaviour.DISABLE_STYLE_CHANGE_SIGNALS)
{
// Initialize the properties
_arrowImage = "./images/arrow.png";
- _textBackgroundColor = new Vector4(0.6f, 0.6f, 0.6f, 1.0f);
+ _textBackgroundColor = new Color(0.6f, 0.6f, 0.6f, 1.0f);
_currentValue = 0;
_minValue = 0;
_maxValue = 0;
{
// Make sure when the current spin that takes input focus also takes the keyboard focus
// For example, when you tap the spin directly
- KeyboardFocusManager.Get().SetCurrentFocusActor(_textField);
+ FocusManager.Instance.SetCurrentFocusActor(_textField);
}
public void TextFieldKeyInputFocusLost(object source, KeyInputFocusLostEventArgs e)
}
}
- // TextColor property of type Vector4:
- public Vector4 TextColor
+ // TextColor property of type Color:
+ public Color TextColor
{
get
{
public void Initialize(object source, AUIApplicationInitEventArgs e)
{
Stage stage = Stage.GetCurrent();
- stage.SetBackgroundColor( NDalic.WHITE );
+ stage.BackgroundColor = Color.White;
// Create a container for the spins
_container = new FlexContainer();
_spinYear.Step = 1;
_spinYear.MaxTextLength = 4;
_spinYear.TextPointSize = 26;
- _spinYear.TextColor = NDalic.WHITE;
+ _spinYear.TextColor = Color.White;
_spinYear.SetKeyboardFocusable(true);
_spinYear.Name = "_spinYear";
_spinMonth.Step = 1;
_spinMonth.MaxTextLength = 2;
_spinMonth.TextPointSize = 26;
- _spinMonth.TextColor = NDalic.WHITE;
+ _spinMonth.TextColor = Color.White;
_spinMonth.SetKeyboardFocusable(true);
_spinMonth.Name = "_spinMonth";
_spinDay.Step = 1;
_spinDay.MaxTextLength = 2;
_spinDay.TextPointSize = 26;
- _spinDay.TextColor = NDalic.WHITE;
+ _spinDay.TextColor = Color.White;
_spinDay.SetKeyboardFocusable(true);
_spinDay.Name = "_spinDay";
- KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.Get();
+ FocusManager keyboardFocusManager = FocusManager.Instance;
keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
keyboardFocusManager.FocusedActorEnterKeyPressed += OnFocusedActorEnterKeyPressed;
}
- private Actor OnKeyboardPreFocusChange(object source, KeyboardFocusManager.PreFocusChangeEventArgs e)
+ private Actor OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
{
Actor nextFocusActor = e.Proposed;
return nextFocusActor;
}
- private void OnFocusedActorEnterKeyPressed(object source, KeyboardFocusManager.FocusedActorEnterKeyEventArgs e)
+ private void OnFocusedActorEnterKeyPressed(object source, FocusManager.FocusedActorEnterKeyEventArgs e)
{
// Make the text field in the current focused spin to take the key input
KeyInputFocusManager manager = KeyInputFocusManager.Get();