mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Updated THEMES.md to reflect tiling changes.
This commit is contained in:
parent
640c3b52bc
commit
20aa6d2a6e
|
@ -48,7 +48,7 @@ Used to display an image.
|
|||
|
||||
`<origin>` - the point on the image that `<pos>` defines, as an image percentage. "0.5 0.5", the center of the image, by default.
|
||||
|
||||
`<tiled />` - if present, the image is tiled instead of resized. A smaller image tiled many times is **slower** than a larger immage tiled few times.
|
||||
`<tiled />` - if present, the image is tiled instead of resized.
|
||||
|
||||
|
||||
Display tags
|
||||
|
@ -98,9 +98,6 @@ The Fast Select box can be themed with these tags:
|
|||
`<boxCorner>` - path to the "top left corner" image file. It will be flipped for the top right, bottom right, and bottom left corners. ~ and . are expanded.
|
||||
|
||||
|
||||
**NOTE:** The tiling tags are in and will tile, but will not properly cut off where they should. This should be fixed in a later commit.
|
||||
|
||||
|
||||
List of variables
|
||||
=================
|
||||
|
||||
|
|
|
@ -284,11 +284,8 @@ void GuiImage::onRender()
|
|||
}
|
||||
}
|
||||
|
||||
void GuiImage::buildImageArray(int posX, int posY, GLfloat* points, GLfloat* texs, float percentageX, float percentageY)
|
||||
void GuiImage::buildImageArray(int posX, int posY, GLfloat* points, GLfloat* texs, float px, float py)
|
||||
{
|
||||
float px = percentageX;
|
||||
float py = percentageY;
|
||||
|
||||
points[0] = posX - (mDrawWidth * mOriginX) * px; points[1] = posY - (mDrawHeight * mOriginY) * py;
|
||||
points[2] = posX - (mDrawWidth * mOriginX) * px; points[3] = posY + (mDrawHeight * (1 - mOriginY)) * py;
|
||||
points[4] = posX + (mDrawWidth * (1 - mOriginX)) * px; points[5] = posY - (mDrawHeight * mOriginY) * py;
|
||||
|
@ -299,29 +296,29 @@ void GuiImage::buildImageArray(int posX, int posY, GLfloat* points, GLfloat* tex
|
|||
|
||||
|
||||
|
||||
texs[0] = 0; texs[1] = percentageY;
|
||||
texs[0] = 0; texs[1] = py;
|
||||
texs[2] = 0; texs[3] = 0;
|
||||
texs[4] = percentageX; texs[5] = percentageY;
|
||||
texs[4] = px; texs[5] = py;
|
||||
|
||||
texs[6] = percentageX; texs[7] = percentageY;
|
||||
texs[6] = px; texs[7] = py;
|
||||
texs[8] = 0; texs[9] = 0;
|
||||
texs[10] = percentageX; texs[11] = 0;
|
||||
texs[10] = px; texs[11] = 0;
|
||||
|
||||
if(mFlipX)
|
||||
{
|
||||
for(int i = 0; i < 11; i += 2)
|
||||
if(texs[i] == percentageX)
|
||||
if(texs[i] == px)
|
||||
texs[i] = 0;
|
||||
else
|
||||
texs[i] = percentageX;
|
||||
texs[i] = px;
|
||||
}
|
||||
if(mFlipY)
|
||||
{
|
||||
for(int i = 1; i < 12; i += 2)
|
||||
if(texs[i] == percentageY)
|
||||
if(texs[i] == py)
|
||||
texs[i] = 0;
|
||||
else
|
||||
texs[i] = percentageY;
|
||||
texs[i] = py;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue