本文整理汇总了C++中slLogDebugFunc函数的典型用法代码示例。如果您正苦于以下问题:C++ slLogDebugFunc函数的具体用法?C++ slLogDebugFunc怎么用?C++ slLogDebugFunc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slLogDebugFunc函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slLogDebugFunc
void BattleroomListCtrl::OnAllySelect(wxCommandEvent& event)
{
slLogDebugFunc("");
int ally = event.GetId() - BRLIST_ALLY;
if (m_sel_user)
m_battle->ForceAlly(*m_sel_user, ally);
}
示例2: slLogDebugFunc
void ServerEvents::OnStartHostedBattle(int battleid)
{
slLogDebugFunc("");
IBattle& battle = m_serv.GetBattle(battleid);
battle.SetInGame(true);
battle.StartSpring();
}
示例3: switch
void abstract_panel::OnTextUpdate(wxCommandEvent& event)
{
settingsChanged = true;
int eventID = event.GetId();
if (eventID == ID_RES_CHOICES_LBOX_X || eventID == ID_RES_CHOICES_LBOX_Y) {
wxTextCtrl* textField = (wxTextCtrl*)event.GetEventObject();
wxString wxStr = textField->GetValue();
long* res = new long;
bool success = (wxStr.ToLong(res));
switch (eventID) {
case ID_RES_CHOICES_LBOX_X: {
// TODO: input validation?
if (success)
(intSettings)[RC_TEXT[0].key] = int((*res));
} break;
case ID_RES_CHOICES_LBOX_Y: {
// TODO: input validation?
if (success)
(intSettings)[RC_TEXT[1].key] = int((*res));
} break;
default:
slLogDebugFunc("unhandled case val");
break;
}
}
}
示例4: slLogDebugFunc
void ChatPanel::CreatePopup()
{
if (m_popup_menu != NULL)
return;
slLogDebugFunc("");
m_popup_menu = new ChatPanelMenu(this);
}
示例5: slLogDebugFunc
void MapSelectDialog::OnHorizontalDirectionClicked(wxCommandEvent& /*unused*/)
{
slLogDebugFunc("");
m_horizontal_direction = !m_horizontal_direction;
m_horizontal_direction_button->SetLabel(m_horizontal_direction ? _T(">") : _T("<"));
UpdateSortAndFilter();
}
示例6: slLogDebugFunc
void Spring::OnTerminated( wxCommandEvent& event )
{
slLogDebugFunc("");
m_running = false;
m_process = NULL;
event.SetEventType(GlobalEvent::OnSpringTerminated);
GlobalEvent::Send(event);
}
示例7: slLogDebugFunc
void Channel::DidAction( User& who, const std::string& action )
{
slLogDebugFunc("");
if ( uidata.panel == 0 ) {
wxLogError( _T("OnChannelDidAction: ud->panel NULL") );
return;
}
uidata.panel->DidAction( TowxString(who.GetNick()), TowxString(action ));
}
示例8: BlendImage
/**
@brief Blends two images based on alpha channel present in foreground image.
@param foreground Foreground image, must have an alpha channel
@param background Background image, may have an alpha channel
@param blend_alpha Whether the returned image will have an alpha channel.
@return A copy of the background image with the foreground image blended on
top of it. The returned image will have an alpha channel iff the background
image has an alpha channel. In that case the alpha channel is blended
identical to the red/green/blue channels.
*/
wxImage BlendImage(const wxImage& foreground, const wxImage& background, bool blend_alpha)
{
if ((foreground.GetWidth() != background.GetWidth()) || (background.GetHeight() != foreground.GetHeight())) {
slLogDebugFunc("size mismatch while blending");
return background;
}
bool zhu = blend_alpha && background.HasAlpha();
if (foreground.HasAlpha()) {
wxImage ret(background.GetWidth(), foreground.GetHeight());
const unsigned char* background_data = background.GetData();
const unsigned char* foreground_data = foreground.GetData();
const unsigned char* background_alpha = NULL;
const unsigned char* foreground_alpha = foreground.GetAlpha();
unsigned char* result_data = ret.GetData();
unsigned char* result_alpha = NULL;
unsigned int pixel_count = background.GetWidth() * background.GetHeight();
if (zhu) {
background_alpha = background.GetAlpha();
ret.InitAlpha();
result_alpha = ret.GetAlpha();
}
for (unsigned int i = 0, i_a = 0; i < pixel_count * 3; i += 3, i_a++) {
unsigned char fore_alpha = foreground_alpha[i_a];
float back_blend_fac = (255 - fore_alpha) / 255.0;
float fore_blend_fac = fore_alpha / 255.0;
result_data[i] = foreground_data[i] * fore_blend_fac + background_data[i] * back_blend_fac;
result_data[i + 1] = foreground_data[i + 1] * fore_blend_fac + background_data[i + 1] * back_blend_fac;
result_data[i + 2] = foreground_data[i + 2] * fore_blend_fac + background_data[i + 2] * back_blend_fac;
if (zhu) {
unsigned char back_alpha = background_alpha[i_a];
result_alpha[i_a] = fore_alpha * fore_blend_fac + back_alpha * back_blend_fac;
}
}
return ret;
}
slLogDebugFunc("cannot blend without alpha");
return background;
}
示例9: slLogDebugFunc
void BattleListTab::OnSelect( wxListEvent& event )
{
slLogDebugFunc("");
if ( event.GetIndex() == -1 ) {
SelectBattle( 0 );
return;
}
IBattle* b = ( m_battle_list->GetSelectedData());
SelectBattle( b );
}