Beispiel #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //try
            //{

            SceneManager.AddSceneToDict(new ChooseNeighbourhoodScene(this.GraphicsDevice, "ChooseNeighbourhoodScene"));
            SceneManager.AddSceneToDict(new Testscene(this.GraphicsDevice, "TestScene"));

            DataprocessingInitialisation.initialize(Content);
            SceneManager.AddSceneToDict(new Button1Scene(this.GraphicsDevice, "Button1Scene"));
            SceneManager.AddSceneToDict(new Button2Scene(this.GraphicsDevice, "Button2Scene"));
            SceneManager.AddSceneToDict(new Button3Scene(this.GraphicsDevice, "Button3Scene"));
            SceneManager.AddSceneToDict(new Button4Scene(this.GraphicsDevice, "Button4Scene"));
            SceneManager.AddSceneToDict(new Button5Scene(this.GraphicsDevice, "Button5Scene"));
            SceneManager.AddSceneToDict(new Button6Scene(this.GraphicsDevice, "Button6Scene"));
            SceneManager.AddSceneToDict(new Button7Scene(this.GraphicsDevice, "Button7Scene"));
            SceneManager.AddSceneToDict(new Button8Scene(this.GraphicsDevice, "Button8Scene"));
            SceneManager.AddSceneToDict(new MainMenuScene(this.GraphicsDevice, "MainMenuScene"));
            SceneManager.AddSceneOnStack("MainMenuScene");

            TextDrawing.LoadSpriteFonts(Content);
            //}
            //catch (Exception e)
            //{
            //    SceneManager.getAScene("TestScene").SetParaMeters(e.GetType().ToString() + "\n");
            //    SceneManager.getAScene("TestScene").SetParaMeters(e.Message + "\n");
            //    SceneManager.getAScene("TestScene").SetParaMeters(e.StackTrace + "\n");
            //}

            // TODO: use this.Content to load your game content here
        }
Beispiel #2
0
 //Draw buttons for location app
 public override void AndroidDraw(SpriteBatch spritebatch, GraphicsDevice graphDevice)
 {
     Save.Draw(spritebatch, Offset);
     Delete.Draw(spritebatch, Offset);
     TextDrawing.Drawtext(new Point(0, 650) + Offset, LocationApplication.ReadCurrentLocationFromFile(), spritebatch);
     //TextDrawing.Drawtext(new Point(400, 800) + Offset, ErrorShow, spritebatch);
 }
Beispiel #3
0
 public override void AndroidDraw(SpriteBatch spritebatch, GraphicsDevice graphDevice)
 {
     //graphDevice.Clear(Color.CornflowerBlue);
     ////genericlol.Draw(spritebatch, Offset);
     //dynamiclol.Draw(spritebatch, Offset);
     TextDrawing.Drawtext(new Point(300, 300) + Offset, haha, spritebatch);
     //dynamiclol2.Draw(spritebatch, Offset);
     //memes.draw(spritebatch, Offset);
     //string testoooo = "";
     //IList<Address> lol = GPS.getNearbyPlaces();
     //if (lol.Count > 0)
     //{
     //    testoooo = lol[0].ToString();
     //}
     //TextDrawing.Drawtext(new Point(500), testoooo, spritebatch);
 }
        public PageDrawing(
            IDebugDrawing drawing,
            DebugPage debugPage,
            int headingLevel,
            bool showButtons)
            : base(
                null,
                "Page '" + debugPage.Name + "'",
                headingLevel)
        {
            LeftMargin   = 20;
            RightMargin  = 20;
            TopMargin    = 20;
            BottomMargin = 20;

            CssClass = "page";

            var text = new List <string>();

            if (!string.IsNullOrEmpty(debugPage.RequiredPermission))
            {
                text.Add("Requires the '" + debugPage.RequiredPermission + "' permission");
            }

            if (text.Count > 0)
            {
                var textDrawing = new TextDrawing
                {
                    Text = text.ToArray()
                };
                AddChild(textDrawing);
            }

            var details = new List <string>();

            AddDebugInfo(details, debugPage);
            AddDetails(details, this);

            if (debugPage.Routes != null)
            {
                foreach (var route in debugPage.Routes)
                {
                    AddChild(new RouteDrawing(route));
                }
            }

            if (debugPage.Layout != null)
            {
                var layout = new LayoutDrawing(
                    drawing,
                    this,
                    debugPage.Layout,
                    headingLevel + 1,
                    showButtons);
                AddChild(layout);
            }

            if (!ReferenceEquals(debugPage.Scope, null))
            {
                AddHeaderButton(this, "Scope")
                .AddChild(new DataScopeRulesDrawing(
                              drawing,
                              this,
                              debugPage.Scope,
                              headingLevel + 1,
                              false,
                              -1));
            }

            if (!ReferenceEquals(debugPage.DataContext, null))
            {
                AddHeaderButton(this, "Context")
                .AddChild(new DataScopeRulesDrawing(
                              drawing,
                              this,
                              debugPage.DataContext,
                              headingLevel + 1,
                              false,
                              -1));
            }
        }
Beispiel #5
0
        public NodeTile(
            DrawingElement drawing,
            string title,
            string cssClass,
            bool disabled,
            int headingLevel = 2,
            string label     = null)
            : base(drawing, cssClass, disabled)
        {
            AddChild(new SpacerDrawing(15, 20));

            Header = new HorizontalListDrawing
            {
                LeftMargin    = 0,
                RightMargin   = 0,
                TopMargin     = 0,
                BottomMargin  = 0,
                Left          = 0,
                Top           = 0,
                FixedPosition = true,
                CssClass      = CssClass
            };
            AddChild(Header);

            if (!string.IsNullOrWhiteSpace(label))
            {
                Label = new RectangleDrawing
                {
                    CssClass     = disabled ? "disabled label" : "label",
                    CornerRadius = CornerRadius,
                    LeftMargin   = 3,
                    TopMargin    = 3,
                    BottomMargin = 2,
                    RightMargin  = 2,
                    Width        = 18,
                    Height       = 22,
                    FixedSize    = true,
                };

                LabelText = new TextDrawing
                {
                    Text     = new[] { label },
                    CssClass = disabled ? "disabled label" : "label"
                };

                if (headingLevel == 3)
                {
                    Label.Width        = 14;
                    Label.Height       = 16;
                    Label.TopMargin    = 3;
                    Label.LeftMargin   = 2;
                    LabelText.TextSize = 9f / 12f;
                }

                Label.AddChild(LabelText);
                Header.AddChild(Label);
            }
            else
            {
                Header.AddChild(new SpacerDrawing(1, 1));
            }

            Title = new TextDrawing
            {
                Text = new[] { title }
            }
            .HeadingLevel(headingLevel);

            if (disabled)
            {
                Title.CssClass = "disabled " + Title.CssClass;
            }

            Header.AddChild(Title);
        }