예제 #1
0
void CUIMpTradeWnd::OnBtnOkClicked(CUIWindow* w, void* d)
{
	CheckDragItemToDestroy				();
	StorePreset							(_preset_idx_last, true);
	GetHolder()->StartStopMenu			(this,true);
	game_cl_Deathmatch * dm				= smart_cast<game_cl_Deathmatch *>(&(Game()));
	dm->OnBuyMenu_Ok					();
}
예제 #2
0
void CUIMpTradeWnd::OnBtnOkClicked(CUIWindow* w, void* d)
{
	DeleteHelperItems();
	CheckDragItemToDestroy				();
	StorePreset							(_preset_idx_last, true, false, false);
	HideDialog							();
	game_cl_mp* clgame					= smart_cast<game_cl_mp*>(&(Game()));
	VERIFY(clgame);
	clgame->OnBuyMenu_Ok					();
//.	StorePreset							(_preset_idx_last, true, true);
}
예제 #3
0
void AvCaster::HandleConfigChanged(const Identifier& a_key)
{
  if (!Store->isControlKey(a_key)) return ;

  bool is_config_pending = bool(Store->root[CONFIG::IS_CONFIG_PENDING_ID]) ;

  if (Gstreamer::Reconfigure(a_key , is_config_pending))
  {
    StorePreset(GetPresetName()) ;

    if      (a_key == CONFIG::IS_CONFIG_PENDING_ID ||
             a_key == CONFIG::PRESET_ID             ) RefreshGui() ;
    else if (a_key == CONFIG::IS_OUTPUT_ON_ID       ) SetWindowTitle() ;
  }
  else
  {
    Store->toogleControl(a_key) ; return ;
  }
}
예제 #4
0
void CUIMpTradeWnd::UpdateMoneyIndicator()
{
	if(m_bIgnoreMoneyAndRank)
	{
		m_static_player_money->SetText	("---");
	}else
	{
		u32 _cost						= 0;
		string128						buff;
		sprintf_s							(buff, "%d", m_money);
		m_static_player_money->SetText	(buff);
		//update preset money
		for(u32 i=_preset_idx_last; i<=_preset_idx_3; ++i)
		{
			CUIStatic* st				= m_static_preset_money[i];
			_cost						= GetPresetCost((ETradePreset)i);
			sprintf_s						(buff, "%d", _cost);
			st->SetText					(buff);
			bool b_has_enought_money	= _cost<=GetMoneyAmount();
			u32 clr						= (b_has_enought_money)?m_text_color_money_positive:m_text_color_money_negative;
			st->SetTextColor			(clr);
			const preset_items&		v	=  GetPreset((ETradePreset)i);
			m_btns_preset[i]->Enable	(b_has_enought_money && v.size()!=0);
		}
	}

	if( !(Device.dwFrame%30) )
	{
		u32 _cost						= 0;
		string128						buff;
		StorePreset						(_preset_idx_temp, true, false, false);
		_cost							= GetPresetCost(_preset_idx_temp);
		sprintf_s							(buff, "%d", _cost);
		m_static_curr_items_money->SetText(buff);
	}
}
예제 #5
0
void CUIMpTradeWnd::SetupDefaultItemsEnd()
{
	StorePreset			(_preset_idx_default, true, false, true);
}
예제 #6
0
void CUIMpTradeWnd::SetupPlayerItemsEnd()
{
	StorePreset			(_preset_idx_origin, true, false, true);
}
예제 #7
0
void CUIMpTradeWnd::OnBtnSave3PresetClicked(CUIWindow* w, void* d)
{
	CheckDragItemToDestroy				();
	StorePreset					(_preset_idx_3, false, true, true);
}