public Background() { Images = new ResourcesList(); Name = Localize.GetString("cs_Background"); CurrentImage = 0; }
public MainWindow() { AllocConsole(); InitializeComponent(); CurrentEnviroment.Game = new Game(); this.ScriptEditor.IsEnabled = false; this.SpriteList.SpriteListView.SelectionChanged += SpriteListView_SelectionChanged; //this.SpriteList.BackgroundContainer.Checked += BackgroundContainer_Checked; this.ScriptPlayer.PlayScreen.PreviewMouseMove += PlayScreen_PreviewMouseMove; List <ScriptStepGroup> toolbar = new List <ScriptStepGroup>(); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Motion"), Types = new List <object>() { new WaitStatement(), new MoveStatement(), new RotationStatement() { Direction = RotationDirection.Clockwise }, new RotationStatement() { Direction = RotationDirection.CounterClockwise }, new ReflectionStatement(), new SetRotationModeStatement(), new SetDegreeStatement(), new SetPositionStatement(), new SetPositionXStatement(), new SetPositionYStatement(), new TimedMoveStatement(), new XPositionExpression(), new YPositionExpression(), new DegreeExpression() } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Looks"), Types = new List <object>() { new ResizeStatement(), new SetImageStatement(), new SetNextImageStatement(), new ShowStatement(), new HideStatement(), new SizeExpression() } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Logic"), Types = new List <object>() { new CompareExpression(), new LogicExpression(), new NotExpression() } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Operation"), Types = new List <object>() { new BinaryExpression(), new ConditionalExpression(), new RandomExpression() } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Control"), Types = new List <object>() { new IfStatement(), new IfStatement() { Alternate = new BlockStatement() }, new LoopStatement(), new WhileStatement(), new BreakStatement(), new ContinueStatement(), new ReturnStatement(), new LogStatement(), new TryStatement() } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Event"), Types = new List <object>() { new StartEventHandler(), new KeyEventHandler(), new ClickEventHandler(), new MessageEvetHandler() } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Variable"), Types = new List <object>() { "CreateVariable", new AssignmentStatement(), } }); toolbar.Add(new ScriptStepGroup() { Name = Localize.GetString("xc_Method"), Types = new List <object>() { "CreateFunction" } }); ScriptEditor.SetToolBar(toolbar); }