private void setOptions() { OptionsComponent options = new OptionsComponent(7); OptionType option = new OptionType("On", "Lindsey", Color.Red, new Vector2(120, 240), OptionAction.previous, true, new Rectangle(120, 240, 120, 30), "Menus/Center Highlight"); option.Alignment = TextAlignment.center; option.ActivateTransition = false; options.add(option); option = new OptionType("Off", "Lindsey", Color.Red, new Vector2(120, 270), OptionAction.previous, true, new Rectangle(120, 270, 120, 30), "Menus/Center Highlight"); option.Alignment = TextAlignment.center; option.ActivateTransition = false; options.add(option); TransitionWrapper transition = new BaseTransition(15, TransitionState.intro); transition = new FloatOptions(transition, new Vector2(0, 15)); transition = new FadeOptions(transition); transition.setTransition(options); options.Intro = transition; transition = new BaseTransition(15, TransitionState.selected); transition = new FloatOptions(transition, new Vector2(0, 15)); transition = new FadeOptions(transition); options.Select = transition; transition.State = TransitionState.exit; options.Exit = transition; addComponent(options); }
private void setOptions() { OptionsComponent options = new OptionsComponent(7); OptionType option = new OptionType("Clear Scores", "Lindsey", Color.Red, new Vector2(24, 60), OptionAction.previous, false, new Rectangle(24, 60, 120, 30), "Menus/Highlight"); option.ActivateSelected = false; options.add(option); option = new OptionType("Back", "Lindsey", Color.Red, new Vector2(24, 90), OptionAction.previous, true, new Rectangle(24, 90, 120, 30), "Menus/Highlight"); option.ActivateSelected = true; options.add(option); TransitionWrapper transition = new BaseTransition(15, TransitionState.intro); transition = new FloatOptions(transition, new Vector2(-20, 0)); transition = new FadeOptions(transition); transition.setTransition(options); options.Intro = transition; transition = new BaseTransition(15, TransitionState.selected); transition = new FloatOptions(transition, new Vector2(20, 0)); transition = new FadeOptions(transition); options.Select = transition; transition.State = TransitionState.exit; options.Exit = transition; addComponent(options); }
private void setOptions() { OptionsComponent options = new OptionsComponent(7); OptionType option = new OptionType("Start Game", "Lindsey", Color.Red, new Vector2(24, 100), OptionAction.startGame, true, new Rectangle(24, 100, 120, 30), "Menus/Highlight"); option.ActivateTransition = false; options.add(option); option = new OptionType("Select Level", "Lindsey", Color.Red, new Vector2(24, 130), "Select Level", new Rectangle(24, 130, 120, 30), "Menus/Highlight"); options.add(option); option = new OptionType("Options", "Lindsey", Color.Red, new Vector2(24, 160), "Options", new Rectangle(24, 160, 120, 30), "Menus/Highlight"); options.add(option); option = new OptionType("Exit", "Lindsey", Color.Red, new Vector2(24, 190), OptionAction.exit, false, new Rectangle(24, 190, 120, 30), "Menus/Highlight"); options.add(option); TransitionWrapper transition = new BaseTransition(15, TransitionState.intro); transition = new FloatOptions(transition, new Vector2(-20, 0)); transition = new FadeOptions(transition); transition.setTransition(options); options.Intro = transition; transition = new BaseTransition(15, TransitionState.selected); transition = new FloatOptions(transition, new Vector2(20, 0)); transition = new FadeOptions(transition); options.Select = transition; transition.State = TransitionState.exit; options.Exit = transition; addComponent(options); }
private void setOptions() { OptionsComponent options = new OptionsComponent(7); OptionType option = new OptionType("Restart", "LindseySmall", Color.Red, new Vector2(120, 135), OptionAction.startGame, true, new Rectangle(120, 135, 120, 25), "Menus/Center Highlight"); option.ActivateTransition = false; option.Alignment = TextAlignment.center; options.add(option); option = new OptionType("Quit", "LindseySmall", Color.Red, new Vector2(120, 160), OptionAction.endGame, true, new Rectangle(120, 160, 120, 25), "Menus/Center Highlight"); option.Alignment = TextAlignment.center; options.add(option); TransitionWrapper transition = new BaseTransition(15, TransitionState.intro); transition = new FloatOptions(transition, new Vector2(15, 0)); transition = new FadeOptions(transition); transition.setTransition(options); options.Intro = transition; transition = new BaseTransition(15, TransitionState.selected); transition = new FloatOptions(transition, new Vector2(15, 0)); transition = new FadeOptions(transition); options.Select = transition; transition.State = TransitionState.exit; options.Exit = transition; addComponent(options); }
private void setOptions() { OptionsComponent options = new OptionsComponent(7); OptionType option = new OptionType("Change Pattern", "Lindsey", Color.Red, new Vector2(24, 60), "Snake Pattern", new Rectangle(24, 60, 120, 30), "Menus/Highlight"); options.add(option); option = new OptionType("Change Color", "Lindsey", Color.Red, new Vector2(24, 90), "Snake Color", new Rectangle(24, 90, 120, 30), "Menus/Highlight"); options.add(option); TransitionWrapper transition = new BaseTransition(15, TransitionState.intro); transition = new FloatOptions(transition, new Vector2(-20, 0)); transition = new FadeOptions(transition); transition.setTransition(options); options.Intro = transition; transition = new BaseTransition(15, TransitionState.selected); transition = new FloatOptions(transition, new Vector2(20, 0)); transition = new FadeOptions(transition); options.Select = transition; transition.State = TransitionState.exit; options.Exit = transition; addComponent(options); }
private static int set_plugOptions(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); TweenerCore <float, float, FloatOptions> tweenerCore = (TweenerCore <float, float, FloatOptions>)obj; FloatOptions plugOptions = (FloatOptions)ToLua.CheckObject(L, 2, typeof(FloatOptions)); tweenerCore.plugOptions = plugOptions; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index plugOptions on a nil value"); } return(result); }
private static int get_plugOptions(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); TweenerCore <float, float, FloatOptions> tweenerCore = (TweenerCore <float, float, FloatOptions>)obj; FloatOptions plugOptions = tweenerCore.plugOptions; ToLua.PushValue(L, plugOptions); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index plugOptions on a nil value"); } return(result); }
private void setOptions() { OptionsComponent options = new OptionsComponent(7); OptionType option = new OptionType("Touch Pad", "Lindsey", Color.Red, new Vector2(24, 60), "Touch Pad", new Rectangle(24, 60, 120, 30), "Menus/Highlight"); option.ActivateSelected = false; options.add(option); option = new OptionType("Sound", "Lindsey", Color.Red, new Vector2(24, 90), "Sound", new Rectangle(24, 90, 120, 30), "Menus/Highlight"); option.ActivateSelected = false; options.add(option); option = new OptionType("Snake Options", "Lindsey", Color.Red, new Vector2(24, 120), "Snake Options", new Rectangle(24, 120, 120, 30), "Menus/Highlight"); options.add(option); option = new OptionType("High Scores", "Lindsey", Color.Red, new Vector2(24, 150), "High Scores", new Rectangle(24, 150, 120, 30), "Menus/Highlight"); options.add(option); option = new OptionType("How to Play", "Lindsey", Color.Red, new Vector2(24, 180), "How to Play", new Rectangle(24, 180, 120, 30), "Menus/Highlight"); options.add(option); option = new OptionType("About", "Lindsey", Color.Red, new Vector2(24, 210), "About", new Rectangle(24, 210, 120, 30), "Menus/Highlight"); options.add(option); TransitionWrapper transition = new BaseTransition(15, TransitionState.intro); transition = new FloatOptions(transition, new Vector2(-20, 0)); transition = new FadeOptions(transition); transition.setTransition(options); options.Intro = transition; transition = new BaseTransition(15, TransitionState.selected); transition = new FloatOptions(transition, new Vector2(20, 0)); transition = new FadeOptions(transition); options.Select = transition; transition.State = TransitionState.exit; options.Exit = transition; addComponent(options); }
public override async Task Apply(CADDocument doc, params string[] args) { CADView view = doc.ActiveView; if (view == null) { return; } Editor ed = doc.Editor; PointOptions opts = new PointOptions("Corner of zoom window: "); opts.AddKeyword("Extents"); opts.AddKeyword("Scale"); opts.AddKeyword("Object"); var p1 = await ed.GetPoint(opts); if (p1.Result == ResultMode.Cancel) { return; } if (p1.Result == ResultMode.Keyword && p1.Keyword == "Extents") { view.SetViewport(); } else if (p1.Result == ResultMode.Keyword && p1.Keyword == "Scale") { FloatOptions fopts = new FloatOptions("Scale factor: "); fopts.AllowNegative = false; fopts.AllowZero = false; fopts.AllowPositive = true; var f1 = await ed.GetFloat(fopts); if (f1.Result != ResultMode.OK) { return; } view.Zoom(1f / f1.Value); } else if (p1.Result == ResultMode.Keyword && p1.Keyword == "Object") { var s1 = await ed.GetSelection("Select objects: "); if (s1.Result != ResultMode.OK || s1.Value.Count == 0) { return; } Extents2D ex = new Extents2D(); foreach (Drawable item in s1.Value) { ex.Add(item.GetExtents()); } view.SetViewport(ex); } else { var p2 = await ed.GetCorner("Opposite corner of zoom window: ", p1.Value); if (p2.Result != ResultMode.OK) { return; } view.SetViewport(p1.Value, p2.Value); } }