diff --git a/THEMES.md b/THEMES.md index 29a157cd7..f312e3cbb 100644 --- a/THEMES.md +++ b/THEMES.md @@ -7,6 +7,8 @@ ES will check two places for a theme: first, the system's search directory for t Almost all positions, dimensions, origins, etc. work in percentages - that is, they are a decimal between 0 and 1, representing the percentage of the screen on that axis to use. This ensures that themes look similar at every resolution. +Colors are hex values, either 6 or 8 characters, defined as RRGGBB or RRGGBBAA. If alpha is not included, a default value of FF will be assumed (not transparent). + Example ======= @@ -60,9 +62,9 @@ Display tags define some "meta" display attributes about your theme. Display tag `` - the hex font color to use for the description on the GuiGameList. -`` - the hex color to use for the "selector bar" on the GuiGameList. Default is `000000`. +`` - the hex color to use for the "selector bar" on the GuiGameList. Default is `000000FF`. -`` - the hex color to use for selected text on the GuiGameList. Default is -1, which will not change the color. +`` - the hex color to use for selected text on the GuiGameList. Default is the value of ``. `` - if present, the games list names will be left aligned to the value of `` (default 0.5). diff --git a/changelog.txt b/changelog.txt index 6bd88c562..53dd6ac62 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ October 17 -Added GuiAnimation class which animates its children. -The game image on the game list now slides/fades in and out. +-You can now define alpha in hex colors (add two characters) - e.g. FFFFFF2F October 14 -Fixed game list continuing to scroll when a menu is opened or a game is started. diff --git a/src/Renderer_draw_gl.cpp b/src/Renderer_draw_gl.cpp index 5915bd385..3291747ac 100644 --- a/src/Renderer_draw_gl.cpp +++ b/src/Renderer_draw_gl.cpp @@ -40,15 +40,19 @@ namespace Renderer { GLubyte colors[6*4]; buildGLColorArray(colors, color, 6); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); + glVertexPointer(2, GL_FLOAT, 0, points); glColorPointer(4, GL_UNSIGNED_BYTE, 0, colors); glDrawArrays(GL_TRIANGLES, 0, 6); + glDisableClientState(GL_BLEND); glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); + glDisable(GL_COLOR_ARRAY); } diff --git a/src/components/GuiGameList.cpp b/src/components/GuiGameList.cpp index 62eb8ebae..1d0218c2f 100644 --- a/src/components/GuiGameList.cpp +++ b/src/components/GuiGameList.cpp @@ -223,8 +223,6 @@ void GuiGameList::updateTheme() mTheme->readXML(""); //clears any current theme mList->setSelectorColor(mTheme->getSelectorColor()); - std::cout << "selector alpha: " << (mTheme->getSelectorColor() & 0x000000ff) << "\n"; - mList->setSelectedTextColor(mTheme->getSelectedTextColor()); mList->setScrollSound(mTheme->getMenuScrollSound()); diff --git a/src/components/GuiList.cpp b/src/components/GuiList.cpp index 5489706af..c5e43cc6e 100644 --- a/src/components/GuiList.cpp +++ b/src/components/GuiList.cpp @@ -223,7 +223,6 @@ template void GuiList::setSelectorColor(unsigned int selectorColor) { mSelectorColor = selectorColor; - std::cout << "mSelectorColor alpha: " << (mSelectorColor & 0x000000ff) << "\n"; } template