Exemplo n.º 1
0
    private void nextTile()
    {
        if (curTitle >= Titles.Count)
        {
            Log.Error("Nope");
            return;
        }


        titleEnd = Game.Time + TitleTime;
        if (curSprites.Count > 0)
        {
            for (int i = 0; i < 8; i++)
            {
                ui.RemoveChild(curSprites[i]);
            }


            curSprites.Clear();
//			ui.RemoveChild(curWid);
        }


        string img_file = Titles[curTitle];

//	Image i1 = new Image(img_file);

        Log.Message("Title:" + img_file);

        float ang = 0;

        for (int i = 0; i < 8; i++)
        {
            float mx = Unigine.MathLib.Cos(ang) * 80;
            float my = Unigine.MathLib.Sin(ang) * 80;



            WidgetLabel s1 = new WidgetLabel(ui, img_file);
            s1.SetPosition(200 + (int)mx, 200 + (int)my);
            s1.Width  = 512;
            s1.Height = 128;

            //int sc = Gui.BLEND_ONE;

            //	s1.SetBlendFunc(sc,Unigine.Gui.BLEND_ONE_MINUS_SRC_ALPHA);
            //		s1.SetLayerBlendFunc(0,sc, Unigine.Gui.BLEND_ONE_MINUS_SRC_ALPHA);
            ui.AddChild(s1, Gui.ALIGN_OVERLAP | Gui.ALIGN_FIXED);

            ang = ang + 45;

            curSprites.Add(s1);
        }


        //curWid = s1;


        curTitle++;
    }
Exemplo n.º 2
0
        #pragma warning restore 0649

        public bool DoExecute()
        {
            Debug.Log("StartUpCommand::DoExecute");

            LoadL10NData();
            L10N.SetLanguage(LanguageCode.EN);

            // setup the main application frame
            Gui.SetL10N(L10N);
            Gui.AddChild(new ApplicationFrame());

            return(true);
        }
Exemplo n.º 3
0
    private void Init()
    {
        // write here code to be called on component initialization
//		var ui = Gui.Get();

        titleEnd = Game.Time;

        ui = ObjUI.GetGui();


        WidgetLabel lab1 = new WidgetLabel(ui, "Testing and work!");

        lab1.SetToolTip("Works!");
        lab1.Arrange();
        lab1.SetPosition(10, 10);


        ui.AddChild(lab1, Gui.ALIGN_OVERLAP | Gui.ALIGN_FIXED);

        nextTile();

        Unigine.Console.Run("show_messages 1");
    }