예제 #1
0
        private void Awake()
        {
            if (get)
            {
                Debug.LogWarning("Icons instance already exists.");
                enabled = false;
                return;
            }

            get = this;
        }
예제 #2
0
 // Add
 public void Add(string name, FontIcon icon)
 {
     Names.Add(name);
     Icons.Add(icon);
 }
예제 #3
0
        public void addIcon(Icons icon, Vector2 a, Vector2 b)
        {
            Glyph g = theGlyphs[(int)icon];

            addImage(theDefaultTexture, a, b, g.minTexCoord, g.maxTexCoord, Color4.White);
        }
예제 #4
0
        //       public void addText(Font font, float size, Vector2 pos, Color4 col, String text, float wrap_width = 0.0f)
        //       {
        //          if (col.A == 0.0)
        //             return;
        //
        //          addCustomRenderCommand(new RenderFontCommand(font, text, col, pos.X + myPosition.X, pos.Y + myPosition.Y));
        //       }

        public void addIcon(Icons icon, Rect r)
        {
            addIcon(icon, r.SW, r.NE);
        }