public void CreateUI(GLEx g) { if (!visible) { return; } image = animation.GetSpriteImage(); if (image == null) { return; } float width = (image.GetWidth() * scaleX); float height = (image.GetHeight() * scaleY); if (filterColor == null) { if (alpha > 0 && alpha < 1) { g.SetAlpha(alpha); } if (LTrans.TRANS_NONE == transform) { g.DrawTexture(image, X(), Y(), width, height, rotation); } else { g.DrawRegion(image, 0, 0, GetWidth(), GetHeight(), transform, X(), Y(), LGraphics.TOP | LGraphics.LEFT); } if (alpha > 0 && alpha < 1) { g.SetAlpha(1); } return; } else { if (alpha > 0 && alpha < 1) { g.SetAlpha(alpha); } if (LTrans.TRANS_NONE == transform) { g.DrawTexture(image, X(), Y(), width, height, rotation, filterColor); } else { g.DrawRegion(image, 0, 0, GetWidth(), GetHeight(), transform, X(), Y(), LGraphics.TOP | LGraphics.LEFT, filterColor); } if (alpha > 0 && alpha < 1) { g.SetAlpha(1); } return; } }