public UserJobTileHost() : base(0.0f, 0.0f, 1.0f, 1.0f) { ThreadAssist.AssertInMainThread(); LeftPadding = 4; box = new AnimatedVBox(); box.StartPadding = 8; box.Spacing = 8; Add(box); ShowAll(); if (ServiceManager.Contains <JobScheduler> ()) { JobScheduler job_manager = ServiceManager.Get <JobScheduler> (); job_manager.JobAdded += OnJobAdded; job_manager.JobRemoved += OnJobRemoved; } if (ApplicationContext.CommandLine.Contains("test-user-job")) { int fish; if (!Int32.TryParse(ApplicationContext.CommandLine["test-user-job"], out fish)) { fish = 5; } TestUserJob.SpawnLikeFish(fish); } }
Widget CreatePlayerDisplay(string name, int points) { var box = new VBox(); box.Add(GuiUtils.CreateBigLabel(name, 30)); var ani = new AnimatedVBox(); ani.Add(GuiUtils.CreateBigLabel(points.ToString(), 30)); box.Add(ani); return(box); }