public AxisConfigurationPanel(AxisConfig config, BindingsControlPanel bindings) : this() { mBindings = bindings; mConfigType = config.GetType(); Init(config); }
/// <summary> /// Input axes will automatically be assigned to camera axes if no axis is specified. /// The ordering is as follows: /// 1st axis: x /// 2nd axis: y /// 3rd axis: z /// 4th axis: pitch /// 5th axis : yaw /// Specify null if you do not which to assign that axis. /// </summary> /// <param name="name"></param> /// <param name="axes"></param> public AxisBasedDelta(string name, AxisConfig config, params IAxis[] axes) { Logger = LogManager.GetLogger(name); mName = name; mConfig = config; mTickListener = new Action(mCore_Tick); foreach (var axis in axes) if (axis != null) AddAxis(axis); #if DEBUG StatisticsCollection.AddStatistics(mStatistics, name); #endif }
private void Init(AxisConfig config) { foreach (var axis in mBindings.GetBoundClasses<IAxis>().Where(ax => !ax.IsAbstract)) { if (IsConstrained(axis)) { config.GetDeadzone(axis.Name); config.GetScale(axis.Name); } config.GetBinding(axis.Name); } mPanel = new ConfigurationObjectControlPanel(config); mPanel.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; mPanel.Location = new Point(0, reloadButton.Height); mPanel.Width = Width; mPanel.Height = Height - mPanel.Location.Y; Controls.Add(mPanel); }
private void Init() { mTickListener = new Action(TickListener); mAxisConfig = new AxisCursorConfig(); foreach (IAxis axis in mInitialAxes) AddAxis(axis); }