コード例 #1
0
        public void SetDraggyCoordinates(
			EditorDraggyMode? mode = null,
			long? frameLength = null,
			string text = null,
			int? mouseX = null,
			int? mouseXOffset = null,
			bool? hasAudio = null,
            long? frameAbsLeft = null)
        {
            if (mode.HasValue && mode.Value != Draggy.Mode)
                stateChanged = true;
            if (frameLength.HasValue && frameLength.Value != Draggy.FrameLength)
                stateChanged = true;
            if (text != Draggy.Text)
                stateChanged = true;
            if (mouseX.HasValue && mouseX.Value != Draggy.MouseX)
                stateChanged = true;
            if (mouseXOffset.HasValue && mouseXOffset.Value != Draggy.MouseXOffset)
                stateChanged = true;
            if (hasAudio.HasValue && hasAudio.Value != Draggy.HasAudio)
                stateChanged = true;
            if (frameAbsLeft.HasValue && frameAbsLeft.Value != Draggy.FrameAbsLeft)
                stateChanged = true;
            Draggy.SetCoordinates(
                mode: mode,
                frameLength: frameLength,
                text: text,
                mouseX: mouseX,
                mouseXOffset: mouseXOffset,
                hasAudio: hasAudio,
                frameAbsLeft: frameAbsLeft);
        }
コード例 #2
0
ファイル: EditorDraggy.cs プロジェクト: miktemk/VidkaEditor
        /// <summary>
        /// Make sure u dont set mode to none from here! Do it only in clear!
        /// </summary>
        internal void SetCoordinates(
			EditorDraggyMode? mode = null,
			long? frameLength = null,
			string text = null,
			int? mouseX = null,
			int? mouseXOffset = null,
			bool? hasAudio = null,
            long? frameAbsLeft = null)
        {
            if (mode.HasValue && mode.Value == EditorDraggyMode.None)
                throw new HowTheFuckDidThisHappenException(null, "Trying to set draggy mode to None in setCoordinates! Should do it in clear!");
            if (mode.HasValue)
                Mode = mode.Value;
            if (frameLength.HasValue)
                FrameLength = frameLength.Value;
            if (text != null)
                Text = text;
            if (mouseX.HasValue)
                MouseX = mouseX.Value;
            if (mouseXOffset.HasValue)
                MouseXOffset = mouseXOffset.Value;
            if (frameAbsLeft.HasValue)
                FrameAbsLeft = frameAbsLeft.Value;
            HasAudio = hasAudio ?? true;
        }