moved skin-specific files to a skins/skinname subdirectory, making it flexible and allowing for future modes
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3611 178a84e3-b1eb-0310-8ba1-8eac791a3b58
@ -1,34 +1,34 @@
|
||||
<skin name="Glass" author="Marianne Gagnon (Auria)">
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="background" image="background.jpg" />
|
||||
<element type="background" image="glass/background.jpg" />
|
||||
|
||||
<element type="button" state="focused" image="glassbutton_focused.png"
|
||||
<element type="button" state="focused" image="glass/glassbutton_focused.png"
|
||||
left_border="80" right_border="80" top_border="0" bottom_border="36"
|
||||
preserve_h_aspect_ratios="true" />
|
||||
|
||||
<element type="button" state="neutral" image="glassbutton.png"
|
||||
<element type="button" state="neutral" image="glass/glassbutton.png"
|
||||
left_border="80" right_border="80" top_border="0" bottom_border="36"
|
||||
preserve_h_aspect_ratios="true" />
|
||||
|
||||
<!-- TODO : buttons could support 'pressed' state -->
|
||||
|
||||
|
||||
<element type="tab" state="neutral" image="glasstab.png"
|
||||
<element type="tab" state="neutral" image="glass/glasstab.png"
|
||||
left_border="75" right_border="75" top_border="0" bottom_border="15"
|
||||
hborder_out_portion="0.2" />
|
||||
|
||||
<element type="tab" state="focused" image="glasstab_focus.png"
|
||||
<element type="tab" state="focused" image="glass/glasstab_focus.png"
|
||||
left_border="75" right_border="75" top_border="0" bottom_border="15"
|
||||
hborder_out_portion="0.2" />
|
||||
|
||||
<element type="tab" state="down" image="glasstab_down.png"
|
||||
<element type="tab" state="down" image="glass/glasstab_down.png"
|
||||
left_border="75" right_border="75" top_border="0" bottom_border="15"
|
||||
hborder_out_portion="0.2" />
|
||||
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="squareSelectionHalo" image="glass_square_focused.png"
|
||||
<element type="squareSelectionHalo" image="glass/glass_square_focused.png"
|
||||
left_border="6" right_border ="6" top_border="6" bottom_border="6"
|
||||
hborder_out_portion="1.0" />
|
||||
|
||||
@ -36,51 +36,51 @@
|
||||
|
||||
|
||||
|
||||
<element type="spinner" state="neutral" image="glassspinner.png"
|
||||
<element type="spinner" state="neutral" image="glass/glassspinner.png"
|
||||
left_border="110" right_border="110" top_border="0" bottom_border="36"
|
||||
preserve_h_aspect_ratios="true" hborder_out_portion="0.0" />
|
||||
|
||||
<element type="spinner" state="focused" image="glassspinner_focus.png"
|
||||
<element type="spinner" state="focused" image="glass/glassspinner_focus.png"
|
||||
left_border="110" right_border="110" top_border="0" bottom_border="36"
|
||||
preserve_h_aspect_ratios="true" hborder_out_portion="0.0" />
|
||||
|
||||
<!-- This one is a bit special. Only area(s) LEFT and/or RIGHT will be rendered. They will be overlaid
|
||||
on top of the spinner's background -->
|
||||
<element type="spinner" state="down" image="glassspinner_down.png"
|
||||
<element type="spinner" state="down" image="glass/glassspinner_down.png"
|
||||
left_border="110" right_border="110" top_border="0" bottom_border="36"
|
||||
preserve_h_aspect_ratios="true" hborder_out_portion="0.0" />
|
||||
|
||||
<!-- For checkboxes, no splitting into 9 areas is done; the image is just stretched -->
|
||||
<element type="checkbox" state="neutral+unchecked" image="glasscheckbox.png"/>
|
||||
<element type="checkbox" state="neutral+checked" image="glasscheckbox_checked.png"/>
|
||||
<element type="checkbox" state="focused+unchecked" image="glasscheckbox_focus.png"/>
|
||||
<element type="checkbox" state="focused+checked" image="glasscheckbox_checked_focus.png"/>
|
||||
<element type="checkbox" state="neutral+unchecked" image="glass/glasscheckbox.png"/>
|
||||
<element type="checkbox" state="neutral+checked" image="glass/glasscheckbox_checked.png"/>
|
||||
<element type="checkbox" state="focused+unchecked" image="glass/glasscheckbox_focus.png"/>
|
||||
<element type="checkbox" state="focused+checked" image="glass/glasscheckbox_checked_focus.png"/>
|
||||
|
||||
<!-- are always in neutral state for now. No splitting into 9 areas is done; the image is just stretched.
|
||||
Note: the body of a guage is the same as for for spinners. -->
|
||||
<element type="gaugefill" image="glasssgauge_fill.png" />
|
||||
<element type="gaugefill" image="glass/glasssgauge_fill.png" />
|
||||
|
||||
<!-- Lists are always in neutral state for now -->
|
||||
<element type="list" image="glass_section.png"
|
||||
<element type="list" image="glass/glass_section.png"
|
||||
left_border="15" right_border="15" top_border="15" bottom_border="15"
|
||||
hborder_out_portion="0.5" vborder_out_portion="1.0f" />
|
||||
|
||||
<element type="listitem" state="focused" image="glasssgauge_fill.png"
|
||||
<element type="listitem" state="focused" image="glass/glasssgauge_fill.png"
|
||||
left_border="0" right_border="0" top_border="0" bottom_border="0"
|
||||
hborder_out_portion="0.0" vborder_out_portion="0.0f" />
|
||||
|
||||
<element type="listitem" state="down" image="glassbutton.png"
|
||||
<element type="listitem" state="down" image="glass/glassbutton.png"
|
||||
left_border="80" right_border="80" top_border="0" bottom_border="36"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0f"
|
||||
areas="body" />
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="section" image="glass_section.png"
|
||||
<element type="section" image="glass/glass_section.png"
|
||||
left_border="15" right_border="15" top_border="15" bottom_border="15"
|
||||
hborder_out_portion="1.0" vborder_out_portion="0.2f" />
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="window" image="glass_section.png"
|
||||
<element type="window" image="glass/glass_section.png"
|
||||
left_border="15" right_border="15" top_border="15" bottom_border="15"
|
||||
hborder_out_portion="1.0" vborder_out_portion="0.2f" />
|
||||
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -39,7 +39,6 @@ Screen::Screen(const char* file)
|
||||
// -----------------------------------------------------------------------------
|
||||
void Screen::loadFromFile()
|
||||
{
|
||||
std::cout << "*** loading GUI screen from file " << (file_manager->getGUIDir() + "/" + m_filename).c_str() << std::endl;
|
||||
IrrXMLReader* xml = irr::io::createIrrXMLReader( (file_manager->getGUIDir() + "/" + m_filename).c_str() );
|
||||
parseScreenFileDiv(xml, m_widgets);
|
||||
m_loaded = true;
|
||||
|
@ -56,7 +56,7 @@ namespace SkinConfig
|
||||
|
||||
BoxRenderParams newParam;
|
||||
// TODO : look for images in a skin-specific directory
|
||||
newParam.image = GUIEngine::getDriver()->getTexture( (file_manager->getGUIDir() + "/" + image).c_str() );
|
||||
newParam.image = GUIEngine::getDriver()->getTexture( (file_manager->getGUIDir() + "/skins/" + image).c_str() );
|
||||
newParam.left_border = leftborder;
|
||||
newParam.right_border = rightborder;
|
||||
newParam.top_border = topborder;
|
||||
@ -103,6 +103,11 @@ namespace SkinConfig
|
||||
static void loadFromFile(std::string file)
|
||||
{
|
||||
XMLNode* root = file_manager->createXMLTree(file);
|
||||
if(!root)
|
||||
{
|
||||
std::cerr << "Could not read XML file " << file.c_str() << std::endl;
|
||||
}
|
||||
|
||||
const int amount = root->getNumNodes();
|
||||
for(int i=0; i<amount; i++)
|
||||
{
|
||||
@ -127,15 +132,16 @@ namespace SkinConfig
|
||||
|
||||
Skin::Skin(IGUISkin* fallback_skin)
|
||||
{
|
||||
SkinConfig::loadFromFile(file_manager->getGUIDir() + "/glass.stkskin" );
|
||||
SkinConfig::loadFromFile( file_manager->getGUIDir() + "/skins/glass.stkskin" );
|
||||
bg_image = NULL;
|
||||
|
||||
m_fallback_skin = fallback_skin;
|
||||
m_fallback_skin->grab();
|
||||
assert(fallback_skin != NULL);
|
||||
|
||||
m_tex_ficonhighlight = GUIEngine::getDriver()->getTexture( (file_manager->getGUIDir() + "/glass_iconhighlight_focus.png").c_str() );
|
||||
m_tex_bubble = GUIEngine::getDriver()->getTexture( (file_manager->getGUIDir() + "/bubble.png").c_str() );
|
||||
// TODO : make those configurable in skin files
|
||||
m_tex_ficonhighlight = GUIEngine::getDriver()->getTexture( (file_manager->getGUIDir() + "/skins/glass/glass_iconhighlight_focus.png").c_str() );
|
||||
m_tex_bubble = GUIEngine::getDriver()->getTexture( (file_manager->getGUIDir() + "/skins/glass/bubble.png").c_str() );
|
||||
|
||||
}
|
||||
|
||||
|