当前位置: 首页>>代码示例>>C++>>正文


C++ InputConfig::GetController方法代码示例

本文整理汇总了C++中InputConfig::GetController方法的典型用法代码示例。如果您正苦于以下问题:C++ InputConfig::GetController方法的具体用法?C++ InputConfig::GetController怎么用?C++ InputConfig::GetController使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在InputConfig的用法示例。


在下文中一共展示了InputConfig::GetController方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetGroup

ControllerEmu::ControlGroup* GetGroup(int pad_num, PadGroup group)
{
  return static_cast<GCPad*>(s_config.GetController(pad_num))->GetGroup(group);
}
开发者ID:delroth,项目名称:dolphin,代码行数:4,代码来源:GCPad.cpp

示例2: GetStatus

GCPadStatus GetStatus(int pad_num)
{
  return static_cast<GCPad*>(s_config.GetController(pad_num))->GetInput();
}
开发者ID:delroth,项目名称:dolphin,代码行数:4,代码来源:GCPad.cpp

示例3: GetMicButton

bool GetMicButton(const u8 pad_num)
{
	return static_cast<GCPad*>(s_config.GetController(pad_num))->GetMicButton();
}
开发者ID:badkarma12,项目名称:dolphin,代码行数:4,代码来源:GCPad.cpp

示例4: Rumble

void Rumble(const u8 pad_num, const ControlState strength)
{
	static_cast<GCPad*>(s_config.GetController(pad_num))->SetOutput(strength);
}
开发者ID:badkarma12,项目名称:dolphin,代码行数:4,代码来源:GCPad.cpp

示例5: wxButton

GamepadPage::GamepadPage(wxWindow* parent, InputConfig& config, const int pad_num,
                         InputConfigDialog* const config_dialog)
    : wxPanel(parent, wxID_ANY), controller(config.GetController(pad_num)),
      m_config_dialog(config_dialog), m_config(config)
{
  wxBoxSizer* control_group_sizer = new ControlGroupsSizer(controller, this, this, &control_groups);

  wxStaticBoxSizer* profile_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Profile"));

  // device chooser

  wxStaticBoxSizer* const device_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Device"));

  device_cbox = new wxComboBox(this, wxID_ANY, "", wxDefaultPosition, wxSize(64, -1));
  device_cbox->ToggleWindowStyle(wxTE_PROCESS_ENTER);

  wxButton* refresh_button =
      new wxButton(this, wxID_ANY, _("Refresh"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);

  device_cbox->Bind(wxEVT_COMBOBOX, &GamepadPage::SetDevice, this);
  device_cbox->Bind(wxEVT_TEXT_ENTER, &GamepadPage::SetDevice, this);
  refresh_button->Bind(wxEVT_BUTTON, &GamepadPage::RefreshDevices, this);

  device_sbox->Add(device_cbox, 1, wxLEFT | wxRIGHT, 3);
  device_sbox->Add(refresh_button, 0, wxRIGHT | wxBOTTOM, 3);

  wxButton* const default_button =
      new wxButton(this, wxID_ANY, _("Default"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
  wxButton* const clearall_button =
      new wxButton(this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);

  wxStaticBoxSizer* const clear_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Reset"));
  clear_sbox->Add(default_button, 1, wxLEFT, 3);
  clear_sbox->Add(clearall_button, 1, wxRIGHT, 3);

  clearall_button->Bind(wxEVT_BUTTON, &GamepadPage::ClearAll, this);
  default_button->Bind(wxEVT_BUTTON, &GamepadPage::LoadDefaults, this);

  profile_cbox = new wxComboBox(this, wxID_ANY, "", wxDefaultPosition, wxSize(64, -1));

  wxButton* const pload_btn =
      new wxButton(this, wxID_ANY, _("Load"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
  wxButton* const psave_btn =
      new wxButton(this, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
  wxButton* const pdelete_btn =
      new wxButton(this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);

  pload_btn->Bind(wxEVT_BUTTON, &GamepadPage::LoadProfile, this);
  psave_btn->Bind(wxEVT_BUTTON, &GamepadPage::SaveProfile, this);
  pdelete_btn->Bind(wxEVT_BUTTON, &GamepadPage::DeleteProfile, this);

  profile_sbox->Add(profile_cbox, 1, wxLEFT, 3);
  profile_sbox->Add(pload_btn, 0, wxLEFT, 3);
  profile_sbox->Add(psave_btn, 0, 0, 3);
  profile_sbox->Add(pdelete_btn, 0, wxRIGHT | wxBOTTOM, 3);

  wxBoxSizer* const dio = new wxBoxSizer(wxHORIZONTAL);
  dio->Add(device_sbox, 1, wxEXPAND | wxRIGHT, 5);
  dio->Add(clear_sbox, 0, wxEXPAND | wxRIGHT, 5);
  dio->Add(profile_sbox, 1, wxEXPAND | wxRIGHT, 5);

  wxBoxSizer* const mapping = new wxBoxSizer(wxVERTICAL);

  mapping->Add(dio, 1, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 5);
  mapping->Add(control_group_sizer, 0, wxLEFT | wxEXPAND, 5);

  UpdateGUI();

  SetSizerAndFit(mapping);  // needed
  Layout();
};
开发者ID:CarlKenner,项目名称:dolphin,代码行数:71,代码来源:InputConfigDiag.cpp

示例6: GetTurntableGroup

ControllerEmu::ControlGroup* GetTurntableGroup(int number, WiimoteEmu::TurntableGroup group)
{
  return static_cast<WiimoteEmu::Wiimote*>(s_config.GetController(number))
      ->GetTurntableGroup(group);
}
开发者ID:MerryMage,项目名称:dolphin,代码行数:5,代码来源:Wiimote.cpp

示例7: DoState

// Save/Load state
void DoState(PointerWrap& p)
{
  for (int i = 0; i < MAX_BBMOTES; ++i)
    static_cast<WiimoteEmu::Wiimote*>(s_config.GetController(i))->DoState(p);
}
开发者ID:MerryMage,项目名称:dolphin,代码行数:6,代码来源:Wiimote.cpp

示例8: ResetAllWiimotes

void ResetAllWiimotes()
{
  for (int i = WIIMOTE_CHAN_0; i < MAX_BBMOTES; ++i)
    static_cast<WiimoteEmu::Wiimote*>(s_config.GetController(i))->Reset();
}
开发者ID:MerryMage,项目名称:dolphin,代码行数:5,代码来源:Wiimote.cpp


注:本文中的InputConfig::GetController方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。