Esempio n. 1
0
Control* Window::MouseButtonDownEvent(int x, int y, uchar button)
{
	Control* control = Control::MouseButtonDownEvent(x, y, button);
	if (control == this && IsDraggable() && 
		xaih::IsPointInRectangle(x, y, GetAbsX(), GetAbsY(), GetWidth(), GetHeight()))
	{
		SetDragX(x - GetAbsX() + GetAlignmentX());
		SetDragY(y - GetAbsY() + GetAlignmentY());	
	}
	return control;
}
Esempio n. 2
0
Control* AnalogStick::MouseButtonDownEvent(int x, int y, uchar button)
{
	Control* control = Control::MouseButtonDownEvent(x, y, button);
	if (control == this)
	{
		if (x < GetAbsX() + GetWidth() / 2)
		{
			SetStickX(x - GetWidth() / 2);
		}
		else
		{
			SetStickX(x - GetWidth() / 2);
		}

		if (y < GetAbsY() + GetHeight() / 2)
		{
			SetStickY(y - GetHeight() / 2);
		}
		else
		{
			SetStickY(y - GetHeight() / 2);
		}
	}
	return control;
}
Esempio n. 3
0
Control* AnalogStick::MouseMoveEvent(int x, int y)
{
	Control* control = Control::MouseMoveEvent(x, y);
	if (IsPressed())
	{
		if (x < GetAbsX() + GetWidth() / 2)
		{
			SetStickX(x - GetWidth() / 2);
		}
		else
		{
			SetStickX(x - GetWidth() / 2);
		}

		if (y < GetAbsY() + GetHeight() / 2)
		{
			SetStickY(y - GetHeight() / 2);
		}
		else
		{
			SetStickY(y - GetHeight() / 2);
		}
	}
	return control;
}
Esempio n. 4
0
void CGuageDialog::Render()
{
//	FlickerMussangGuage();
	//cDialog::Render();

	if( !IsActive() ) return ;
	cDialog::RenderWindow();
	cDialog::RenderComponent();

	if(PARTYMGR->GetMasterID() == gHeroID)
	{
		const float extraWidth = 11.0f;
		const float markWidth = 14.0f;
		VECTOR2 position = {
			GetAbsX() + float(GetWidth()) - extraWidth - markWidth,
			GetAbsY() + 8.0f};
		VECTOR2 scale = {1.0f, 1.0f};

		m_MasterMark.RenderSprite(
			&scale,
			0,
			0,
			&position,
			0xffffffff) ;
	}
}
Esempio n. 5
0
void Label::Render()
{
	if (!IsVisible()) return;
	
	XAGUI::GetRenderer()->Render(GetStaticText(), GetAbsX(), GetAbsY(), GetFlip());
	Control::Render();
}
Esempio n. 6
0
//100118 ONS 친구관리 다이얼로그에 PC방정보관련 기능추가(클래스 아이콘 출력)
void CFriendDialog::Render()
{
    cDialog::RenderWindow();
    cDialog::RenderComponent();
    cTabDialog::RenderTabComponent();

    if(m_pPCRoomTabBtn->IsActive())
    {
        VECTOR2 scale = {0,};																// 이미지 스케일을 적용할 벡터를 선언한다.
        scale.x = 1.0f;																// 스케일 X를 1로 세팅한다.
        scale.y = 1.0f;																// 스케일 Y를 1로 세팅한다.

        VECTOR2 vPos = {0,};																// 이미지 위치를 적용할 벡터를 선언한다.
        DWORD dwColor = 0xffffffff ;												// 이미지 출력에 적용할 색상을 선언한다.
        for( int nRow = 0 ; nRow < MAX_PCROOM_MEMBER_LIST ; ++nRow )
        {
            vPos.y = (float)(GetAbsY() + 122) + (20*nRow) ;							// 이미지 출력위치 Y를 세팅한다.

            vPos.x = (float)(GetAbsX() + 30) ;										// 이미지 출력위치 X를 세팅한다.

            if( !m_pClassImg[nRow].IsNull() )										// 멤버 클래스 이미지가 널이 아니라면,
            {
                m_pClassImg[nRow].RenderSprite(&scale, NULL, 0, &vPos, dwColor) ;	// 멤버 클래스 이미지를 출력한다.
            }
        }
    }
}
Esempio n. 7
0
void AnalogStick::SetStickX(sint stickX)
{
	if (stickX < GetAbsX() - ceil(GetWidth() / 4.0f))
	{
		_stickX = GetAbsX() - static_cast<sint>(ceil(GetWidth() / 4.0f));
		SetValueX(-1.0f);
	}
	else if (stickX > GetAbsX() + ceil(GetWidth() / 4.0f))
	{
		_stickX = GetAbsX() + static_cast<sint>(ceil(GetWidth() / 4.0f));
		SetValueX(1.0f);
	}
	else 
	{
		_stickX = stickX;
		SetValueX((GetStickX() - GetAbsX()) / xaih::Round((GetWidth() / 4.0f)));
	}
}
Esempio n. 8
0
void ScrollBar::Render()
{
    if (!IsVisible()) return;

    XAGUI::GetRenderer()->Render(XAGUI::GetSkin(), GetAbsX(), GetAbsY(), Slider::GetWidth(),
                                 Slider::GetHeight(), GetSrcX(GetState()), GetSrcY(GetState()), GetSrcWidth(), GetSrcHeight(),
                                 GetColorRed(GetState()), GetColorGreen(GetState()), GetColorBlue(GetState()),
                                 GetColorAlpha(GetState()), GetFlip());
    Control::Render();
}
Esempio n. 9
0
//---중요!!! 다이얼로그가 액티브상태가 아니라 그려지 않으면 원래 하위 게임유아이들도 그려지지 않으나,
//---이 브라우저는 윈도우가 뜨는 것이라 꼭 액티브상태를 꺼줘야한다.
//---따라서 cDialog::SetActiveRecursive() 를 사용하라. 
//---void CItemShopDlg::SetActive( BOOL val ) 참고.
void cBrowser::SetActive(BOOL val)
{
	if(IsDisable())
	{
		return;
	}
	
	m_bActive = val;

	if(val)
	{
		// 091221 LUJ, 맵 이동 시 종종 cBrowser의 소멸자 호출 시에
		//			ATL 오류가 발생한다. m_hwndIE가 사용되지 않은
		//			핸들로 나타난다. 오류 빈도를 줄이기 위해 창을
		//			열때에만 창을 생성하도록 수정
		if(0 == m_hwndIE)
		{
			m_hwndIE = CreateWindow(
				"AtlAxWin71",
				"about:blank",
				FULLSCREEN_WITH_BLT == GAMERESRCMNGR->GetResolution().dispType ? WS_POPUP : WS_CHILD,
				int(GetAbsX()),
				int(GetAbsY()),
				GetWidth(),
				GetHeight(),
				_g_hWnd,
				0,
				GetModuleHandle(0),
				0);
			CComPtr<IUnknown> punkIE = 0;

			if(S_OK == AtlAxGetControl(
				m_hwndIE,
				&punkIE))
			{
				m_pWebBrowser = punkIE;
			}
		}

		ShowWindow(
			m_hwndIE,
			SW_SHOW);
	}
	else
	{
		if(m_hwndIE)
		{
			ShowWindow(
				m_hwndIE,
				SW_HIDE);
		}
	}
}
Esempio n. 10
0
void Slider::MarkerOnMouseButtonDown(Control* control, int x, int y, uchar button)
{
	if (GetOrientation() == ORIENTATION_VERTICAL)
	{
		SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / static_cast<float>(GetHeight() / 
			static_cast<float>(y - GetAbsY()))));
	}
	else
	{
		SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / static_cast<float>(GetWidth() / 
			static_cast<float>(x - GetAbsX()))));
	}
}
Esempio n. 11
0
DWORD CMiniMapDlg::ActionEvent( CMouse* mouseInfo )
{
	DWORD we = cDialog::ActionEvent( mouseInfo );

	if( ! m_bActive )
	{
		return we;
	}

	if( we & WE_MOUSEOVER )
	{
		cImageRect& rect = m_MiniMap.mRect;
		char text[128] = {0,};
		
		VECTOR2 trans;
		trans.x = GetAbsX() + m_MiniMap.mTranslation.x - rect.left;
		trans.y = GetAbsY() + m_MiniMap.mTranslation.y - rect.top;

		m_IconTable.SetPositionHead();

		for(CMiniMapIcon* pIcon = m_IconTable.GetData();
			0 < pIcon;
			pIcon = m_IconTable.GetData())
		{
			int sort = pIcon->GetToolTip(mouseInfo->GetMouseX(),mouseInfo->GetMouseY(),&trans,text);

			if(sort == 1)				// Npc
			{
				SetToolTip( text, RGB_HALF( 255, 255, 0 ), &m_TooltipImage, RGB_HALF( 0, 0, 0 )  );
			}
			else if(sort == 2)			// Party
			{
				SetToolTip( text, RGB_HALF(185, 241, 69), &m_TooltipImage, RGB_HALF( 0, 0, 0 )  );
			}
			else if(sort == 3)			// Farm
			{
				SetToolTip( text, RGB_HALF( 255, 255, 0 ), &m_TooltipImage, RGB_HALF( 0, 0, 0 )  );
			}
		}
 
		if( ! strlen( text ) )
		{
			SetToolTip("");
		}
	}

	return we;
}
Esempio n. 12
0
void Slider::MarkerOnMouseMove(Control* control, int x, int y)
{
	if (GetMarker()->IsPressed())
	{
		if (GetOrientation() == ORIENTATION_VERTICAL)
		{
			SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / 
				static_cast<float>(GetHeight() / static_cast<float>(y - GetAbsY()))));
		}
		else
		{
			SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / 
				static_cast<float>(GetWidth() / static_cast<float>(x - GetAbsX()))));
		}
	}
}
Esempio n. 13
0
Control* Slider::MouseButtonDownEvent(int x, int y, uchar button)
{
	Control* control = Control::MouseButtonDownEvent(x, y, button);
	if (control == this)
	{
		if (GetOrientation() == ORIENTATION_VERTICAL)
		{
			SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / 
				static_cast<float>(GetHeight() / static_cast<float>(y - GetAbsY()))));
		}
		else
		{
			SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / 
				static_cast<float>(GetWidth() / static_cast<float>(x - GetAbsX()))));
		}
	}
	return control;
}
Esempio n. 14
0
Control* Slider::MouseMoveEvent(int x, int y)
{
	Control* control = Control::MouseMoveEvent(x, y);
	if (control == this && IsPressed())
	{
		if (GetOrientation() == ORIENTATION_VERTICAL)
		{
			SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / 
				static_cast<float>(GetHeight() / static_cast<float>(y - GetAbsY()))));
		}
		else
		{
			SetValue(static_cast<int>((GetMaxValue() - GetMinValue()) / 
				static_cast<float>(GetWidth() / static_cast<float>(x - GetAbsX()))));
		}
	}
	return control;
}
Esempio n. 15
0
void AnalogStick::ResetStick()
{
	SetStickX(GetAbsX());
	SetStickY(GetAbsY());
}
Esempio n. 16
0
void CMiniMapDlg::Render()
{
	if( !	m_bActive ||
			m_MiniMap.mImage.IsNull() )
	{
		return;
	}
	// 100612 레벨업 버튼 활성화시
	if( m_pLevelUpBTN )
	{
		if( m_pLevelUpBTN->IsActive() && !(m_pLevelUpBTN->IsPushed()) )
		{
			DWORD dwCurTick		=	GetTickCount();
			DWORD dwResultTime	=	dwCurTick - m_dwLevelUPBTNStartTime;

			if( dwResultTime > 1000 )
			{
				m_dwLevelUPBTNStartTime = GetTickCount();
			}
			m_pLevelUpBTN->SetAlpha((BYTE)(2.5f * (dwResultTime/10)) );
		}
		else
			m_pLevelUpBTN->SetAlpha( 255 );
	}


	cDialog::RenderWindow();
	
	VECTOR2 trans;
	trans.x = GetAbsX() + m_MiniMap.mTranslation.x;
	trans.y = GetAbsY() + m_MiniMap.mTranslation.y;
	
	m_MiniMap.mImage.RenderSprite( &m_MiniMap.mScale, 0, 0, &trans, m_dwImageRGB );

	cImageRect* rect = &m_MiniMap.mRect;

	trans.x -= rect->left;
	trans.y -= rect->top;
	
	m_IconTable.SetPositionHead();

	for(CMiniMapIcon* pIcon = m_IconTable.GetData();
		0 < pIcon;
		pIcon = m_IconTable.GetData())
	{
		pIcon->Render(&trans,rect);
	}

	m_IconTable.SetPositionHead();

	for(CMiniMapIcon* pIcon = m_IconTable.GetData();
		0 < pIcon;
		pIcon = m_IconTable.GetData())
	{
		pIcon->RenderQuestMark(&trans,rect);
	}

	m_HeroIcon.Render(&trans);

	// 090909 ShinJS --- Move Point 출력, 기존의 퀘스트마크 출력을 이용
	m_MovePoint.RenderQuestMark( &trans, rect );

	cDialog::RenderComponent();
}