From 6a0d150539897ec65ccc161305db48de10ea35ba Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 16 Sep 2012 10:38:08 +0200 Subject: 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 --- src/ui/button.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/button.cpp') diff --git a/src/ui/button.cpp b/src/ui/button.cpp index d6a5c40..7473409 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -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; -- cgit v1.2.3-1-g7c22