Ejemplo n.º 1
0
        public TimelineViewButton(int pixelsPerSecond, float timelineDuration, Button button, TimelineData timelineData, Color normalColor, Color selectedColor)
        {
            this.normalColor   = normalColor;
            this.selectedColor = selectedColor;
            colorArea          = button.ImageBox;
            colorArea.setCoord(DurationButtonWidth, colorArea.Top, button.Width - DurationButtonWidth * 2, colorArea.Height);
            colorArea.setColour(normalColor);

            this.pixelsPerSecond = pixelsPerSecond;
            this.button          = button;

            if (button.Width < MinButtonSize)
            {
                button.setSize(MinButtonSize, button.Height);
            }

            durationButton                     = button.createWidgetT("Button", "TimelineButtonTimeAdjusterSkin", button.Width - DurationButtonWidth, button.Top, DurationButtonWidth, button.Height, Align.Top | Align.Right, "") as Button;
            durationButton.MouseDrag          += new MyGUIEvent(durationButton_MouseDrag);
            durationButton.MouseButtonPressed += new MyGUIEvent(durationButton_MouseButtonPressed);
            durationButton.Pointer             = "size_horz";

            startTimeButton                     = button.createWidgetT("Button", "TimelineButtonTimeAdjusterSkin", 0, button.Top, DurationButtonWidth, button.Height, Align.Top | Align.Left, "") as Button;
            startTimeButton.MouseDrag          += new MyGUIEvent(startTimeButton_MouseDrag);
            startTimeButton.MouseButtonPressed += new MyGUIEvent(startTimeButton_MouseButtonPressed);
            startTimeButton.Pointer             = "size_horz";

            this.timelineData           = timelineData;
            this.timelineDuration       = timelineDuration;
            timelineData._CurrentButton = this;
            button.MouseDrag           += new MyGUIEvent(button_MouseDrag);
            button.MouseButtonPressed  += new MyGUIEvent(button_MouseButtonPressed);
        }
Ejemplo n.º 2
0
 public abstract void setCurrentData(TimelineData data);