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 brokendev-ui
parent
af9af56bb0
commit
6a0d150539
|
@ -371,6 +371,8 @@ bool CApplication::Create()
|
|||
// Create the robot application.
|
||||
m_robotMain = new CRobotMain(m_iMan, this);
|
||||
|
||||
m_robotMain->ChangePhase(PHASE_WELCOME1);
|
||||
|
||||
GetLogger()->Info("CApplication created successfully\n");
|
||||
|
||||
return true;
|
||||
|
@ -854,7 +856,7 @@ bool CApplication::ProcessEvent(const Event &event)
|
|||
if (m_debugMode)
|
||||
l->Info("Focus change: active = %s\n", event.active.gain ? "true" : "false");
|
||||
|
||||
if (m_active != event.active.gain)
|
||||
/*if (m_active != event.active.gain)
|
||||
{
|
||||
m_active = event.active.gain;
|
||||
|
||||
|
@ -862,7 +864,7 @@ bool CApplication::ProcessEvent(const Event &event)
|
|||
ResumeSimulation();
|
||||
else
|
||||
SuspendSimulation();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (event.type == EVENT_KEY_DOWN)
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "common/global.h"
|
||||
#include "common/event.h"
|
||||
#include "common/logger.h"
|
||||
#include "CBot/resource.h"
|
||||
#include "object/object.h"
|
||||
|
||||
|
@ -140,7 +141,12 @@ static const char* GetResourceBase(ResType type, int num)
|
|||
str = strings_text[num];
|
||||
break;
|
||||
case RES_EVENT:
|
||||
assert(num < strings_event_len);
|
||||
// assert(num < strings_event_len);
|
||||
if (num >= strings_event_len)
|
||||
{
|
||||
GetLogger()->Error("GetResource invalid event num: %d\n", num);
|
||||
return "";
|
||||
}
|
||||
str = strings_event[num];
|
||||
break;
|
||||
case RES_OBJECT:
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "graphics/engine/water.h"
|
||||
#include "math/geometry.h"
|
||||
#include "sound/sound.h"
|
||||
#include "ui/interface.h"
|
||||
|
||||
|
||||
// Initial size of various vectors
|
||||
|
@ -87,15 +88,6 @@ Gfx::EngineObjLevel4::EngineObjLevel4(bool used, Gfx::EngineTriangleType type, c
|
|||
vertices.reserve(LEVEL4_VERTEX_PREALLOCATE_COUNT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: temporary stub for CInterface
|
||||
class CInterface
|
||||
{
|
||||
public:
|
||||
void Draw() {}
|
||||
};
|
||||
|
||||
Gfx::CEngine::CEngine(CInstanceManager *iMan, CApplication *app)
|
||||
{
|
||||
m_iMan = iMan;
|
||||
|
@ -3124,7 +3116,7 @@ void Gfx::CEngine::DrawInterface()
|
|||
m_device->SetTransform(Gfx::TRANSFORM_WORLD, m_matWorldInterface);
|
||||
|
||||
// Draw the entire interface
|
||||
CInterface* interface = static_cast<CInterface*>( m_iMan->SearchInstance(CLASS_INTERFACE) );
|
||||
Ui::CInterface* interface = static_cast<Ui::CInterface*>( m_iMan->SearchInstance(CLASS_INTERFACE) );
|
||||
if (interface != nullptr)
|
||||
interface->Draw();
|
||||
|
||||
|
@ -3834,6 +3826,8 @@ void Gfx::CEngine::DrawMouseSprite(Math::Point pos, Math::Point size, int icon)
|
|||
Gfx::Vertex(Math::Vector(p2.x, p2.y, 0.0f), normal, Math::Point(u2, v1))
|
||||
};
|
||||
|
||||
m_device->SetRenderState(Gfx::RENDER_STATE_DEPTH_TEST, false);
|
||||
m_device->SetRenderState(Gfx::RENDER_STATE_DEPTH_WRITE, false);
|
||||
m_device->DrawPrimitive(Gfx::PRIMITIVE_TRIANGLE_STRIP, vertex, 4);
|
||||
AddStatisticTriangle(2);
|
||||
}
|
||||
|
|
|
@ -1391,18 +1391,18 @@ void CAutoBase::BeginTransit()
|
|||
|
||||
if ( m_param == PARAM_TRANSIT2 )
|
||||
{
|
||||
m_bgBack = "back01.tga"; // clouds orange / blue
|
||||
m_bgBack = "back01.png"; // clouds orange / blue
|
||||
}
|
||||
else if ( m_param == PARAM_TRANSIT3 )
|
||||
{
|
||||
m_bgBack = "back22.tga"; // blueberries clouds
|
||||
m_bgBack = "back22.png"; // blueberries clouds
|
||||
}
|
||||
else
|
||||
{
|
||||
#if _DEMO
|
||||
m_bgBack = "back46b.tga"; // paintings
|
||||
m_bgBack = "back46b.png"; // paintings
|
||||
#else
|
||||
m_bgBack = "back46.tga"; // paintings
|
||||
m_bgBack = "back46.png"; // paintings
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -414,11 +414,11 @@ void CAutoPortico::UpdateTrackMapping(float left, float right)
|
|||
limit[0] = 0.0f;
|
||||
limit[1] = 1000000.0f;
|
||||
|
||||
m_engine->TrackTextureMapping(rank, mat, Gfx::ENG_RSTATE_PART1, "lemt.tga", "",
|
||||
m_engine->TrackTextureMapping(rank, mat, Gfx::ENG_RSTATE_PART1, "lemt.png", "",
|
||||
limit[0], limit[1], Gfx::ENG_TEX_MAPPING_X,
|
||||
right, 8.0f, 8.0f, 192.0f, 256.0f);
|
||||
|
||||
m_engine->TrackTextureMapping(rank, mat, Gfx::ENG_RSTATE_PART2, "lemt.tga", "",
|
||||
m_engine->TrackTextureMapping(rank, mat, Gfx::ENG_RSTATE_PART2, "lemt.png", "",
|
||||
limit[0], limit[1], Gfx::ENG_TEX_MAPPING_X,
|
||||
left, 8.0f, 8.0f, 192.0f, 256.0f);
|
||||
}
|
||||
|
|
|
@ -2007,11 +2007,11 @@ void CMotionVehicle::UpdateTrackMapping(float left, float right, ObjectType type
|
|||
limit[2] = limit[1];
|
||||
limit[3] = m_engine->GetLimitLOD(1);
|
||||
|
||||
m_engine->TrackTextureMapping(rRank, mat, Gfx::ENG_RSTATE_PART1, "drawer.tga", "",
|
||||
m_engine->TrackTextureMapping(rRank, mat, Gfx::ENG_RSTATE_PART1, "drawer.png", "",
|
||||
limit[0], limit[1], Gfx::ENG_TEX_MAPPING_X,
|
||||
right, 1.0f, 8.0f, 192.0f, 256.0f);
|
||||
|
||||
m_engine->TrackTextureMapping(lRank, mat, Gfx::ENG_RSTATE_PART2, "drawer.tga", "",
|
||||
m_engine->TrackTextureMapping(lRank, mat, Gfx::ENG_RSTATE_PART2, "drawer.png", "",
|
||||
limit[0], limit[1], Gfx::ENG_TEX_MAPPING_X,
|
||||
left, 1.0f, 8.0f, 192.0f, 256.0f);
|
||||
}
|
||||
|
@ -2024,11 +2024,11 @@ void CMotionVehicle::UpdateTrackMapping(float left, float right, ObjectType type
|
|||
|
||||
for ( i=0 ; i<2 ; i++ )
|
||||
{
|
||||
m_engine->TrackTextureMapping(rRank, mat, Gfx::ENG_RSTATE_PART1, "lemt.tga", "",
|
||||
m_engine->TrackTextureMapping(rRank, mat, Gfx::ENG_RSTATE_PART1, "lemt.png", "",
|
||||
limit[i*2+0], limit[i*2+1], Gfx::ENG_TEX_MAPPING_X,
|
||||
right, 1.0f, 8.0f, 192.0f, 256.0f);
|
||||
|
||||
m_engine->TrackTextureMapping(lRank, mat, Gfx::ENG_RSTATE_PART2, "lemt.tga", "",
|
||||
m_engine->TrackTextureMapping(lRank, mat, Gfx::ENG_RSTATE_PART2, "lemt.png", "",
|
||||
limit[i*2+0], limit[i*2+1], Gfx::ENG_TEX_MAPPING_X,
|
||||
left, 1.0f, 8.0f, 192.0f, 256.0f);
|
||||
}
|
||||
|
|
|
@ -6062,7 +6062,7 @@ void CObject::UpdateEnergyMapping()
|
|||
for ( j=0 ; j<3 ; j++ )
|
||||
{
|
||||
m_engine->ChangeTextureMapping(m_objectPart[0].object,
|
||||
mat, Gfx::ENG_RSTATE_PART3, "lemt.tga", "",
|
||||
mat, Gfx::ENG_RSTATE_PART3, "lemt.png", "",
|
||||
limit[j*2+0], limit[j*2+1], Gfx::ENG_TEX_MAPPING_1Y,
|
||||
au, bu, 1.0f, 0.0f);
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ bool CButton::EventProcess(const Event &event)
|
|||
}
|
||||
|
||||
if ( event.type == EVENT_MOUSE_BUTTON_DOWN &&
|
||||
event.mouseButton.button == 1 &&
|
||||
event.mouseButton.button == 1 &&
|
||||
(m_state & STATE_VISIBLE) &&
|
||||
(m_state & STATE_ENABLE) )
|
||||
{
|
||||
|
@ -125,8 +125,8 @@ bool CButton::EventProcess(const Event &event)
|
|||
}
|
||||
|
||||
if ( event.type == EVENT_MOUSE_BUTTON_UP && //left
|
||||
event.mouseButton.button == 1 &&
|
||||
m_bCapture )
|
||||
event.mouseButton.button == 1 &&
|
||||
m_bCapture )
|
||||
{
|
||||
if ( CControl::Detect(event.pos) )
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ void CButton::Draw()
|
|||
(m_state & STATE_CARD ) == 0 &&
|
||||
(m_state & STATE_SIMPLY) == 0 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
dp = 0.5f / 256.0f;
|
||||
|
|
|
@ -108,7 +108,7 @@ void CCheck::Draw()
|
|||
DrawShadow(m_pos, m_dim);
|
||||
}
|
||||
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
zoomExt = 1.00f;
|
||||
|
|
|
@ -145,7 +145,7 @@ void CColor::Draw()
|
|||
DrawShadow(m_pos, m_dim);
|
||||
}
|
||||
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
CControl::Draw();
|
||||
|
||||
|
@ -153,7 +153,7 @@ void CColor::Draw()
|
|||
// color = GetColor(m_color);
|
||||
color = GetColor();
|
||||
|
||||
m_engine->SetTexture("xxx.tga"); // no texture
|
||||
m_engine->SetTexture("xxx.png"); // no texture
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
device = m_engine->GetDevice();
|
||||
|
@ -187,7 +187,7 @@ void CColor::Draw()
|
|||
|
||||
color = GetColor();
|
||||
|
||||
m_engine->SetTexture("xxx.tga"); // no texture
|
||||
m_engine->SetTexture("xxx.png"); // no texture
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
vertex[0] = Gfx::VertexCol(Math::Vector(p1.x, p1.y, 0.0f), color, Gfx::Color(), Math::Point(0.0f, 0.0f));
|
||||
|
|
|
@ -89,7 +89,7 @@ void CCompass::Draw()
|
|||
|
||||
device = m_engine->GetDevice();
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
p1.x = m_pos.x;
|
||||
|
|
|
@ -437,7 +437,7 @@ void CControl::Draw()
|
|||
|
||||
if ( (m_state & STATE_VISIBLE) == 0 ) return;
|
||||
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
zoomExt = 1.00f;
|
||||
|
@ -491,7 +491,7 @@ void CControl::Draw()
|
|||
|
||||
if ( m_state & STATE_OKAY )
|
||||
{
|
||||
m_engine->SetTexture("button3.tga");
|
||||
m_engine->SetTexture("button3.png");
|
||||
icon = 3; // yellow with green point pressed
|
||||
}
|
||||
|
||||
|
@ -507,22 +507,22 @@ void CControl::Draw()
|
|||
{
|
||||
icon -= 192;
|
||||
#if _POLISH
|
||||
m_engine->SetTexture("textp.tga");
|
||||
m_engine->SetTexture("textp.png");
|
||||
#else
|
||||
m_engine->SetTexture("text.tga");
|
||||
m_engine->SetTexture("text.png");
|
||||
#endif
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
}
|
||||
else if ( icon >= 128 )
|
||||
{
|
||||
icon -= 128;
|
||||
m_engine->SetTexture("button3.tga");
|
||||
m_engine->SetTexture("button3.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
}
|
||||
else if ( icon >= 64 )
|
||||
{
|
||||
icon -= 64;
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
}
|
||||
else
|
||||
|
@ -755,7 +755,7 @@ void CControl::DrawWarning(Math::Point pos, Math::Point dim)
|
|||
|
||||
dp = 0.5f / 256.0f;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
uv1.x = 64.0f / 256.0f;
|
||||
|
@ -799,7 +799,7 @@ void CControl::DrawShadow(Math::Point pos, Math::Point dim, float deep)
|
|||
|
||||
dp = 0.5f/256.0f;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState( Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
|
||||
pos.x += deep * 0.010f * 0.75f;
|
||||
|
|
|
@ -1131,9 +1131,9 @@ void CEdit::DrawImage(Math::Point pos, const char *name, float width,
|
|||
float dp;
|
||||
char filename[100];
|
||||
|
||||
//? sprintf(filename, "diagram\\%s.bmp", name);
|
||||
//? sprintf(filename, "diagram\\%s.png", name);
|
||||
UserDir(filename, name, "diagram");
|
||||
strcat(filename, ".bmp");
|
||||
strcat(filename, ".png");
|
||||
|
||||
m_engine->SetTexture(filename);
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
@ -1163,7 +1163,7 @@ void CEdit::DrawBack(Math::Point pos, Math::Point dim)
|
|||
|
||||
if ( m_bGeneric ) return;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
if ( m_bMulti )
|
||||
|
@ -1214,9 +1214,9 @@ void CEdit::DrawPart(Math::Point pos, Math::Point dim, int icon)
|
|||
float dp;
|
||||
|
||||
#if _POLISH
|
||||
m_engine->SetTexture("textp.tga");
|
||||
m_engine->SetTexture("textp.png");
|
||||
#else
|
||||
m_engine->SetTexture("text.tga");
|
||||
m_engine->SetTexture("text.png");
|
||||
#endif
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
|
@ -1426,9 +1426,9 @@ void CEdit::FreeImage()
|
|||
|
||||
for ( i=0 ; i<m_imageTotal ; i++ )
|
||||
{
|
||||
//? sprintf(filename, "diagram\\%s.bmp", m_image[i].name);
|
||||
//? sprintf(filename, "diagram\\%s.png", m_image[i].name);
|
||||
UserDir(filename, m_image[i].name, "diagram");
|
||||
strcat(filename, ".bmp");
|
||||
strcat(filename, ".png");
|
||||
m_engine->DeleteTexture(filename);
|
||||
}
|
||||
}
|
||||
|
@ -1439,9 +1439,9 @@ void CEdit::LoadImage(const char *name)
|
|||
{
|
||||
char filename[100];
|
||||
|
||||
//? sprintf(filename, "diagram\\%s.bmp", name);
|
||||
//? sprintf(filename, "diagram\\%s.png", name);
|
||||
UserDir(filename, name, "diagram");
|
||||
strcat(filename, ".bmp");
|
||||
strcat(filename, ".png");
|
||||
m_engine->LoadTexture(filename);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ void CGauge::Draw()
|
|||
|
||||
if ( (m_state & STATE_VISIBLE) == 0 ) return;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
dp = 0.5f/256.0f;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -117,7 +117,7 @@ void CImage::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
|
||||
|
|
|
@ -154,7 +154,7 @@ void CKey::Draw()
|
|||
DrawShadow(m_pos, m_dim);
|
||||
|
||||
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); // was D3DSTATENORMAL
|
||||
|
||||
zoomExt = 1.00f;
|
||||
|
|
|
@ -341,7 +341,7 @@ void CList::Draw()
|
|||
dim = m_dim;
|
||||
|
||||
if (m_icon == 0) {
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
uv1.x = 128.0f / 256.0f;
|
||||
|
@ -349,7 +349,7 @@ void CList::Draw()
|
|||
uv2.x = 160.0f / 256.0f;
|
||||
uv2.y = 96.0f / 256.0f;
|
||||
} else {
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
|
||||
uv1.x = 132.0f / 256.0f;
|
||||
|
@ -382,7 +382,7 @@ void CList::Draw()
|
|||
dim.y *= 0.4f;
|
||||
pos.y -= dim.y;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw
|
||||
uv1.x = 120.0f / 256.0f;
|
||||
uv1.y = 64.0f / 256.0f;
|
||||
|
@ -448,7 +448,7 @@ void CList::Draw()
|
|||
dim.y -= 4.0f / 480.0f;
|
||||
|
||||
if ( m_check[i + m_firstLine] ) {
|
||||
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;
|
||||
|
@ -471,7 +471,7 @@ void CList::Draw()
|
|||
uv2.y -= dp;
|
||||
DrawIcon(pos, dim, uv1, uv2); // draws v
|
||||
} else {
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); // was D3DSTATETTw
|
||||
if ( i + m_firstLine == m_selectLine ) {
|
||||
uv1.x =224.0f / 256.0f; // <
|
||||
|
|
|
@ -2207,7 +2207,7 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( m_engine->GetMouseVisible() &&
|
||||
if ( /*TODO: m_engine->GetMouseVisible() &&*/
|
||||
!m_interface->EventProcess(event) )
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -315,7 +315,7 @@ void CMap::Draw()
|
|||
m_offset = AdjustOffset(m_map[MAPMAXOBJECT - 1].pos);
|
||||
|
||||
if ( m_fixImage[0] == 0 ) { // drawing of the relief?
|
||||
m_engine->SetTexture("map.tga");
|
||||
m_engine->SetTexture("map.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 0.5f + (m_offset.x - (m_half / m_zoom)) / (m_half * 2.0f);
|
||||
uv1.y = 0.5f - (m_offset.y + (m_half / m_zoom)) / (m_half * 2.0f);
|
||||
|
@ -455,7 +455,7 @@ void CMap::DrawFocus(Math::Point pos, float dir, ObjectType type, MapColor color
|
|||
uv2.x = 126.0f/256.0f;
|
||||
uv2.y = 255.0f/256.0f;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
|
||||
bEnding = false;
|
||||
|
@ -515,7 +515,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
return; // flashes
|
||||
}
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
if ( bUp )
|
||||
{
|
||||
|
@ -658,7 +658,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
{
|
||||
if ( bSelect )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
if ( m_bToy )
|
||||
{
|
||||
|
@ -684,7 +684,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
{
|
||||
if ( m_bRadar )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
uv1.x = 64.5f/256.0f; // blue triangle
|
||||
uv1.y = 240.5f/256.0f;
|
||||
|
@ -704,7 +704,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
|
||||
if ( color == MAPCOLOR_WAYPOINTb )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 192.5f/256.0f; // blue cross
|
||||
uv1.y = 240.5f/256.0f;
|
||||
|
@ -714,7 +714,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
}
|
||||
if ( color == MAPCOLOR_WAYPOINTr )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 208.5f/256.0f; // red cross
|
||||
uv1.y = 240.5f/256.0f;
|
||||
|
@ -724,7 +724,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
}
|
||||
if ( color == MAPCOLOR_WAYPOINTg )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 224.5f/256.0f; // green cross
|
||||
uv1.y = 240.5f/256.0f;
|
||||
|
@ -734,7 +734,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
}
|
||||
if ( color == MAPCOLOR_WAYPOINTy )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 240.5f/256.0f; // yellow cross
|
||||
uv1.y = 240.5f/256.0f;
|
||||
|
@ -744,7 +744,7 @@ void CMap::DrawObject(Math::Point pos, float dir, ObjectType type, MapColor colo
|
|||
}
|
||||
if ( color == MAPCOLOR_WAYPOINTv )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 192.5f/256.0f; // violet cross
|
||||
uv1.y = 224.5f/256.0f;
|
||||
|
@ -765,7 +765,7 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color,
|
|||
|
||||
dp = 0.5f/256.0f;
|
||||
|
||||
m_engine->SetTexture("button3.tga");
|
||||
m_engine->SetTexture("button3.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
if ( color == MAPCOLOR_MOVE )
|
||||
{
|
||||
|
@ -887,7 +887,7 @@ void CMap::DrawHighlight(Math::Point pos)
|
|||
dim.x *= 2.0f+cosf(m_time*8.0f)*0.5f;
|
||||
dim.y *= 2.0f+cosf(m_time*8.0f)*0.5f;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 160.5f/256.0f; // hilite
|
||||
uv1.y = 224.5f/256.0f;
|
||||
|
@ -1003,7 +1003,7 @@ void CMap::UpdateTerrain()
|
|||
// TODO: map texture manipulation
|
||||
return;
|
||||
|
||||
// if ( !m_engine->OpenImage("map.tga") ) return;
|
||||
// if ( !m_engine->OpenImage("map.png") ) return;
|
||||
|
||||
scale = m_terrain->GetReliefScale();
|
||||
water = m_water->GetLevel();
|
||||
|
@ -1066,7 +1066,7 @@ void CMap::UpdateTerrain(int bx, int by, int ex, int ey)
|
|||
// TODO: map texture manipulation
|
||||
return;
|
||||
|
||||
//if ( !m_engine->OpenImage("map.tga") ) return;
|
||||
//if ( !m_engine->OpenImage("map.png") ) return;
|
||||
//m_engine->LoadImage();
|
||||
|
||||
scale = m_terrain->GetReliefScale();
|
||||
|
|
|
@ -379,7 +379,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
|
||||
if ( icon == 0 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 0.0f/256.0f; // yellow rectangle
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
@ -389,7 +389,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 1 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 128.0f/256.0f; // gray rectangle
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
@ -399,7 +399,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 2 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 64.0f/256.0f; // blue rectangle
|
||||
uv1.y = 0.0f/256.0f;
|
||||
|
@ -409,7 +409,7 @@ void CScroll::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 104.0f/256.0f; // blue line -
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
|
|
@ -116,7 +116,7 @@ void CShortcut::Draw()
|
|||
zoom = 1.0f;
|
||||
}
|
||||
|
||||
m_engine->SetTexture("button3.tga");
|
||||
m_engine->SetTexture("button3.png");
|
||||
|
||||
if ( icon != -1 )
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ void CShortcut::Draw()
|
|||
Math::Point p1, p2, c, uv1, uv2;
|
||||
float zoom, dp;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
|
||||
zoom = 0.9f+sinf(m_time*8.0f)*0.1f;
|
||||
|
@ -172,7 +172,7 @@ void CShortcut::Draw()
|
|||
Math::Point uv1, uv2;
|
||||
float dp;
|
||||
|
||||
m_engine->SetTexture("button3.tga");
|
||||
m_engine->SetTexture("button3.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
|
||||
uv1.x = 160.0f/256.0f;
|
||||
|
|
|
@ -498,7 +498,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
|
||||
if ( icon == 0 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 0.0f/256.0f; // yellow rectangle
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
@ -510,7 +510,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 1 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 128.0f/256.0f; // gray rectangle
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
@ -522,7 +522,7 @@ void CSlider::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 224.0f/256.0f; // cursor
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
|
|
@ -1186,7 +1186,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
|
||||
if ( icon == 0 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
uv1.x = 64.0f/256.0f; // dark blue transparent
|
||||
uv1.y = 64.0f/256.0f;
|
||||
|
@ -1202,7 +1202,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 1 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE);
|
||||
uv1.x = 128.0f/256.0f; // yellow tooltip
|
||||
uv1.y = 0.0f/256.0f;
|
||||
|
@ -1216,7 +1216,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 2 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 128.0f/256.0f; // yellow
|
||||
uv1.y = 16.0f/256.0f;
|
||||
|
@ -1230,7 +1230,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 3 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 0.0f/256.0f; // transparent blue bar with yellow upper
|
||||
uv1.y = 64.0f/256.0f;
|
||||
|
@ -1249,7 +1249,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
dim.x += 100.0f/640.0f;
|
||||
dim.y += 60.0f/480.0f;
|
||||
|
||||
m_engine->SetTexture("human.tga");
|
||||
m_engine->SetTexture("human.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 140.0f/256.0f;
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
@ -1266,7 +1266,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
dim.x -= 20.0f/640.0f;
|
||||
dim.y += 0.0f/480.0f;
|
||||
|
||||
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 = 32.0f/256.0f;
|
||||
|
@ -1285,7 +1285,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
dim.x -= 20.0f/640.0f;
|
||||
dim.y -= 20.0f/480.0f;
|
||||
|
||||
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;
|
||||
|
@ -1321,7 +1321,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
dim.x -= 20.0f/640.0f;
|
||||
dim.y -= 20.0f/480.0f;
|
||||
|
||||
m_engine->SetTexture("button3.tga");
|
||||
m_engine->SetTexture("button3.png");
|
||||
uv1.x = 0.0f/256.0f;
|
||||
uv1.y = 224.0f/256.0f;
|
||||
uv2.x = 32.0f/256.0f;
|
||||
|
@ -1332,7 +1332,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
uv2.y -= dp;
|
||||
DrawIcon(pos, dim, uv1, uv2); // dark blue background
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
uv1.x = 224.0f/256.0f;
|
||||
uv1.y = 224.0f/256.0f;
|
||||
uv2.x = 249.0f/256.0f;
|
||||
|
@ -1404,7 +1404,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 5 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 64.0f/256.0f; // transparent green
|
||||
uv1.y = 160.0f/256.0f;
|
||||
|
@ -1418,7 +1418,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 6 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 64.0f/256.0f; // transparent red
|
||||
uv1.y = 176.0f/256.0f;
|
||||
|
@ -1432,7 +1432,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 7 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_BLACK);
|
||||
uv1.x = 64.0f/256.0f; // transparent blue
|
||||
uv1.y = 192.0f/256.0f;
|
||||
|
@ -1446,7 +1446,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 8 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 0.0f/256.0f; // opaque orange
|
||||
uv1.y = 0.0f/256.0f;
|
||||
|
@ -1462,7 +1462,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 9 )
|
||||
{
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 32.0f/256.0f; // opaque gray
|
||||
uv1.y = 32.0f/256.0f;
|
||||
|
@ -1482,7 +1482,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( 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; // transparent yellow
|
||||
uv1.y = 224.0f/256.0f;
|
||||
|
@ -1496,7 +1496,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 12 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 128.0f/256.0f; // dirty opaque gray
|
||||
uv1.y = 128.0f/256.0f;
|
||||
|
@ -1512,7 +1512,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 13 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 192.0f/256.0f; // dirty opaque blue
|
||||
uv1.y = 128.0f/256.0f;
|
||||
|
@ -1528,7 +1528,7 @@ void CWindow::DrawVertex(Math::Point pos, Math::Point dim, int icon)
|
|||
}
|
||||
else if ( icon == 14 )
|
||||
{
|
||||
m_engine->SetTexture("button1.tga");
|
||||
m_engine->SetTexture("button1.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 160.0f/256.0f; // dirty opaque red
|
||||
uv1.y = 128.0f/256.0f;
|
||||
|
@ -1556,7 +1556,7 @@ void CWindow::DrawHach(Math::Point pos, Math::Point dim)
|
|||
|
||||
dp = 0.5f/256.0f;
|
||||
|
||||
m_engine->SetTexture("button2.tga");
|
||||
m_engine->SetTexture("button2.png");
|
||||
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
|
||||
uv1.x = 64.0f/256.0f; // hatching
|
||||
uv1.y = 208.0f/256.0f;
|
||||
|
|
Loading…
Reference in New Issue