void cWidgetListBox::OnInit()
{
    mpSlider = mpSet->CreateWidgetSlider(eWidgetSliderOrientation_Vertical,0,0,0,this);
    mpSlider->AddCallback(eGuiMessage_SliderMove,this,kGuiCallback(MoveSlider));

    AddCallback(eGuiMessage_OnDraw,this,kGuiCallback(DrawText));

    OnChangeSize();
}
Exemple #2
0
	void cWidgetComboBox::OnInit()
	{
		m_pText = m_pSet->CreateWidgetTextBox(0,m_vSize,_W(""),this);
		m_pText->SetText(m_sText);
		m_pText->SetCanEdit(false);

		m_pButton = m_pSet->CreateWidgetButton(0,0,_W(""),this);
		m_pButton->SetImage(m_pSkin->GetGfx(eGuiSkinGfx_ComboBoxButtonIcon), false);
		m_pButton->AddCallback(eGuiMessage_MouseDown, this, kGuiCallback(ButtonPress));

		m_pSlider = m_pSet->CreateWidgetSlider(eWidgetSliderOrientation_Vertical,0,0,0,this);
		m_pSlider->AddCallback(eGuiMessage_SliderMove,this,kGuiCallback(SliderMove));
		m_pSlider->AddCallback(eGuiMessage_LostFocus,this,kGuiCallback(SliderLostFocus));
		m_pSlider->SetEnabled(false);
		m_pSlider->SetVisible(false);

		AddCallback(eGuiMessage_OnDraw,this,kGuiCallback(DrawText));

		OnChangeSize();
	}