2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef __CONFIGDIALOG_h__
|
|
|
|
#define __CONFIGDIALOG_h__
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/button.h>
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
#include <wx/combobox.h>
|
|
|
|
#include <wx/checkbox.h>
|
|
|
|
#include <wx/panel.h>
|
2010-01-08 20:27:54 +00:00
|
|
|
#include "Thread.h"
|
2009-07-05 04:29:00 +00:00
|
|
|
|
2009-07-06 00:27:32 +00:00
|
|
|
class WiimoteRecordingConfigDialog : public wxDialog
|
2009-07-05 04:29:00 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
WiimoteRecordingConfigDialog(wxWindow *parent,
|
2010-02-25 06:12:35 +00:00
|
|
|
wxWindowID id = wxID_ANY,
|
2009-07-05 04:29:00 +00:00
|
|
|
const wxString &title = wxT("Wii Remote Plugin Configuration"),
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE | wxWANTS_CHARS);
|
|
|
|
virtual ~WiimoteRecordingConfigDialog(){;}
|
|
|
|
|
|
|
|
void UpdateRecordingGUI(int Slot = 0);
|
|
|
|
void LoadFile();
|
|
|
|
void SaveFile();
|
|
|
|
void DoRecordMovement(int _x, int _y, int _z, const u8 *_IR, int IRBytes);
|
|
|
|
void DoRecordA(bool Pressed);
|
|
|
|
void ConvertToString();
|
|
|
|
|
|
|
|
void CloseClick(wxCommandEvent& event);
|
|
|
|
void RecordMovement(wxCommandEvent& event);
|
|
|
|
void Update(wxTimerEvent& WXUNUSED(event));
|
|
|
|
|
|
|
|
bool m_bWaitForRecording,
|
|
|
|
m_bRecording;
|
|
|
|
|
|
|
|
int m_iRecordTo;
|
|
|
|
|
|
|
|
wxTimer *m_TimeoutTimer;
|
|
|
|
|
|
|
|
// General status
|
|
|
|
wxStaticText * m_TextUpdateRate,
|
|
|
|
*m_TextIR;
|
|
|
|
|
|
|
|
// Wiimote status
|
|
|
|
wxGauge *m_GaugeBattery,
|
|
|
|
*m_GaugeRoll[2],
|
|
|
|
*m_GaugeGForce[3],
|
2010-01-08 20:27:54 +00:00
|
|
|
*m_GaugeAccel[3],
|
|
|
|
*m_GaugeAccelNunchuk[3],
|
|
|
|
*m_GaugeGForceNunchuk[3];
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
|
|
|
|
bool ControlsCreated;
|
2010-01-08 20:27:54 +00:00
|
|
|
THREAD_RETURN SafeCloseReadWiimote_ThreadFunc2(void* arg);
|
|
|
|
Common::Thread* g_pReadThread2;
|
2009-07-05 04:29:00 +00:00
|
|
|
|
|
|
|
wxPanel *m_PageRecording;
|
|
|
|
wxButton *m_Close,
|
|
|
|
*m_Apply;
|
|
|
|
|
|
|
|
wxBoxSizer *m_MainSizer,
|
|
|
|
*m_sRecordingMain;
|
|
|
|
|
|
|
|
wxCheckBox *m_UpdateMeters;
|
|
|
|
|
|
|
|
wxButton * m_RecordButton[RECORDING_ROWS + 1];
|
|
|
|
wxChoice * m_RecordHotKeySwitch[RECORDING_ROWS + 1];
|
|
|
|
wxChoice * m_RecordHotKeyWiimote[RECORDING_ROWS + 1];
|
|
|
|
wxChoice * m_RecordHotKeyNunchuck[RECORDING_ROWS + 1];
|
|
|
|
wxChoice * m_RecordHotKeyIR[RECORDING_ROWS + 1];
|
|
|
|
wxTextCtrl * m_RecordText[RECORDING_ROWS + 1];
|
|
|
|
wxTextCtrl * m_RecordGameText[RECORDING_ROWS + 1];
|
|
|
|
wxTextCtrl * m_RecordIRBytesText[RECORDING_ROWS + 1];
|
|
|
|
wxTextCtrl * m_RecordSpeed[RECORDING_ROWS + 1];
|
|
|
|
wxChoice * m_RecordPlayBackSpeed[RECORDING_ROWS + 1];
|
|
|
|
|
|
|
|
std::vector<SRecording> m_vRecording;
|
|
|
|
int IRBytes;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2010-02-25 06:12:35 +00:00
|
|
|
ID_RECORDINGPAGE = 1000,
|
2009-07-05 04:29:00 +00:00
|
|
|
IDTM_UPDATE,
|
|
|
|
|
|
|
|
// Real
|
|
|
|
ID_UPDATE_REAL,
|
|
|
|
IDB_RECORD = 2000,
|
|
|
|
IDC_RECORD = 3000,
|
|
|
|
IDC_PLAY_WIIMOTE,
|
|
|
|
IDC_PLAY_NUNCHUCK,
|
|
|
|
IDC_PLAY_IR,
|
|
|
|
IDT_RECORD_TEXT,
|
|
|
|
IDT_RECORD_GAMETEXT,
|
|
|
|
IDT_RECORD_IRBYTESTEXT,
|
|
|
|
IDT_RECORD_SPEED,
|
|
|
|
IDT_RECORD_PLAYSPEED
|
|
|
|
};
|
|
|
|
|
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
void CreateGUIControlsRecording();
|
|
|
|
void RecordingChanged(wxCommandEvent& event);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern WiimoteRecordingConfigDialog *m_RecordingConfigFrame;
|
2009-07-10 06:16:22 +00:00
|
|
|
#endif
|