diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-16 10:38:08 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-16 10:38:08 +0200 |
commit | 6a0d150539897ec65ccc161305db48de10ea35ba (patch) | |
tree | 7064e569459bd8d704edd28552f48bf2978d61a0 /src/ui/group.cpp | |
parent | af9af56bb007050c969af310c4e816d260b9ce7f (diff) | |
download | colobot-6a0d150539897ec65ccc161305db48de10ea35ba.tar.gz colobot-6a0d150539897ec65ccc161305db48de10ea35ba.tar.bz2 colobot-6a0d150539897ec65ccc161305db48de10ea35ba.zip |
Interface works
- removed mock of CInterface and fixed event passing to CRobotMain
- changed texture names from tga and bmp to png
- UI now works but interaction is still broken
Diffstat (limited to 'src/ui/group.cpp')
-rw-r--r-- | src/ui/group.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/ui/group.cpp b/src/ui/group.cpp index facf208..67369d9 100644 --- a/src/ui/group.cpp +++ b/src/ui/group.cpp @@ -94,7 +94,7 @@ void CGroup::Draw() if ( m_icon == 0 ) // hollow frame? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 160.0f / 256.0f; uv1.y = 192.0f / 256.0f; // u-v texture @@ -110,7 +110,7 @@ void CGroup::Draw() } if ( m_icon == 1 ) // orange solid opaque? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 104.0f / 256.0f; uv1.y = 48.0f / 256.0f; @@ -124,7 +124,7 @@ void CGroup::Draw() } if ( m_icon == 2 ) // orange degrade -> transparent? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 112.0f / 256.0f; uv1.y = 48.0f / 256.0f; @@ -138,7 +138,7 @@ void CGroup::Draw() } if ( m_icon == 3 ) // transparent gradient -> gray? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 120.0f / 256.0f; uv1.y = 48.0f / 256.0f; @@ -152,7 +152,7 @@ void CGroup::Draw() } if ( m_icon == 4 ) // degrade blue corner? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 192.0f / 256.0f; uv1.y = 128.0f / 256.0f; @@ -166,7 +166,7 @@ void CGroup::Draw() } if ( m_icon == 5 ) // degrade orange corner? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 224.0f / 256.0f; uv1.y = 128.0f / 256.0f; @@ -180,7 +180,7 @@ void CGroup::Draw() } if ( m_icon == 6 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 0.0f / 256.0f; // brown transparent uv1.y = 75.0f / 256.0f; @@ -196,7 +196,7 @@ void CGroup::Draw() } if ( m_icon == 7 ) { - m_engine->SetTexture("button1.tga"); + m_engine->SetTexture("button1.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f / 256.0f; uv1.y = 0.0f / 256.0f; @@ -210,7 +210,7 @@ void CGroup::Draw() } if ( m_icon == 8 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f / 256.0f; // green transparent uv1.y = 160.0f / 256.0f; @@ -224,7 +224,7 @@ void CGroup::Draw() } if ( m_icon == 9 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f / 256.0f; // red transparent uv1.y = 176.0f/256.0f; @@ -238,7 +238,7 @@ void CGroup::Draw() } if ( m_icon == 10 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f / 256.0f; // blue transparent uv1.y = 192.0f / 256.0f; @@ -252,7 +252,7 @@ void CGroup::Draw() } if ( m_icon == 11 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); uv1.x = 64.0f / 256.0f; // yellow transparent uv1.y = 224.0f / 256.0f; @@ -269,7 +269,7 @@ void CGroup::Draw() dim.x = m_dim.x / 2.0f; dim.y = m_dim.y / 2.0f; - m_engine->SetTexture("mouse.tga"); + m_engine->SetTexture("mouse.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/300.0f; pos.y = m_pos.y+m_dim.y/300.0f+dim.y; @@ -308,7 +308,7 @@ void CGroup::Draw() } if ( m_icon == 13 ) // corner upper / left? { - m_engine->SetTexture("mouse.tga"); + m_engine->SetTexture("mouse.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; @@ -329,7 +329,7 @@ void CGroup::Draw() } if ( m_icon == 14 ) // corner upper / right? { - m_engine->SetTexture("mouse.tga"); + m_engine->SetTexture("mouse.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; @@ -350,7 +350,7 @@ void CGroup::Draw() } if ( m_icon == 15 ) // corner lower / left? { - m_engine->SetTexture("mouse.tga"); + m_engine->SetTexture("mouse.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; @@ -371,7 +371,7 @@ void CGroup::Draw() } if ( m_icon == 16 ) // corner lower / left? { - m_engine->SetTexture("mouse.tga"); + m_engine->SetTexture("mouse.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK); pos.x = m_pos.x-m_dim.x/150.0f; pos.y = m_pos.y+m_dim.y/150.0f; @@ -392,7 +392,7 @@ void CGroup::Draw() } if ( m_icon == 17 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 0.0f / 256.0f; // blue frame uv1.y = 75.0f / 256.0f; @@ -408,7 +408,7 @@ void CGroup::Draw() } if ( m_icon == 18 ) // arrow> for SatCom? { - m_engine->SetTexture("button1.tga"); + m_engine->SetTexture("button1.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 0.0f / 256.0f; // > uv1.y = 192.0f / 256.0f; @@ -422,7 +422,7 @@ void CGroup::Draw() } if ( m_icon == 19 ) // SatCom symbol? { - m_engine->SetTexture("button1.tga"); + m_engine->SetTexture("button1.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 224.0f / 256.0f; // SatCom symbol uv1.y = 224.0f / 256.0f; @@ -436,7 +436,7 @@ void CGroup::Draw() } if ( m_icon == 20 ) // solid blue background? { - m_engine->SetTexture("button1.tga"); + m_engine->SetTexture("button1.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 224.0f / 256.0f; uv1.y = 32.0f / 256.0f; @@ -450,7 +450,7 @@ void CGroup::Draw() } if ( m_icon == 21 ) // stand-by symbol? { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = 160.0f / 256.0f; uv1.y = 32.0f / 256.0f; @@ -464,7 +464,7 @@ void CGroup::Draw() } if ( m_icon == 22 ) { - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f / 256.0f; // opaque yellow uv1.y = 224.0f / 256.0f; @@ -481,7 +481,7 @@ void CGroup::Draw() if ( m_icon == 23 ) { - m_engine->SetTexture("button3.tga"); + m_engine->SetTexture("button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f / 256.0f; // yellow uv1.y = 192.0f / 256.0f; @@ -497,7 +497,7 @@ void CGroup::Draw() } if ( m_icon == 24 ) { - m_engine->SetTexture("button3.tga"); + m_engine->SetTexture("button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 80.0f / 256.0f; // orange uv1.y = 192.0f / 256.0f; @@ -513,7 +513,7 @@ void CGroup::Draw() } if ( m_icon == 25 ) { - m_engine->SetTexture("button3.tga"); + m_engine->SetTexture("button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 64.0f / 256.0f; // orange uv1.y = 208.0f / 256.0f; @@ -529,7 +529,7 @@ void CGroup::Draw() } if ( m_icon == 26 ) { - m_engine->SetTexture("button3.tga"); + m_engine->SetTexture("button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 80.0f / 256.0f; // red uv1.y = 208.0f / 256.0f; @@ -545,7 +545,7 @@ void CGroup::Draw() } if ( m_icon == 27 ) { - m_engine->SetTexture("button3.tga"); + m_engine->SetTexture("button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 32.0f / 256.0f; uv1.y = 0.0f / 256.0f; @@ -563,7 +563,7 @@ void CGroup::Draw() pos = m_pos; dim = m_dim; - m_engine->SetTexture("button2.tga"); + m_engine->SetTexture("button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = 32.0f / 256.0f; uv1.y = 32.0f / 256.0f; @@ -575,7 +575,7 @@ void CGroup::Draw() uv2.y -= dp; DrawIcon(pos, dim, uv1, uv2); - m_engine->SetTexture("button3.tga"); + m_engine->SetTexture("button3.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); pos.x += 8.0f / 640.0f; pos.y += 8.0f / 480.0f; |