More UI Progress.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3052 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-05-20 22:29:30 +00:00
parent 0fb724295b
commit c4e2bfefb7
10 changed files with 43 additions and 40 deletions

View File

@ -292,7 +292,8 @@ namespace pxSizerFlags
};
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE( pxEvt_OnThreadCleanup, -1 );
// Added to the event queue by pxDialogWithHelpers
DECLARE_EVENT_TYPE( pxEvt_OnDialogCreated, -1 )
END_DECLARE_EVENT_TYPES()
// --------------------------------------------------------------------------------------
@ -321,6 +322,12 @@ public:
virtual int ShowModal();
virtual bool Show( bool show=true );
// Must return the same thing as GetNameStatic; a name ideal for use in uniquely
// identifying dialogs. (this version is the 'instance' version, which is called
// by BaseConfigurationDialog to assign the wxWidgets dialog name, and for saving
// screenshots to disk)
virtual wxString GetDialogName() const;
virtual pxStaticText* Text( const wxString& label );
virtual pxStaticHeading* Heading( const wxString& label );
@ -330,7 +337,7 @@ public:
bool HasIdealWidth() const { return m_idealWidth != wxDefaultCoord; }
protected:
void OnActivate(wxActivateEvent& evt);
void OnDialogCreated( wxCommandEvent& evt );
void OnOkCancel(wxCommandEvent& evt);
void OnCloseWindow(wxCloseEvent& event);
};

View File

@ -25,8 +25,6 @@
using namespace pxSizerFlags;
DEFINE_EVENT_TYPE( pxEvt_OnThreadCleanup );
// --------------------------------------------------------------------------------------
// BaseDeletableObject Implementation
// --------------------------------------------------------------------------------------
@ -103,6 +101,8 @@ bool pxDialogExists( const wxString& name )
// wxDialogWithHelpers Class Implementations
// =====================================================================================================
DEFINE_EVENT_TYPE( pxEvt_OnDialogCreated )
IMPLEMENT_DYNAMIC_CLASS(wxDialogWithHelpers, wxDialog)
wxDialogWithHelpers::wxDialogWithHelpers()
@ -150,11 +150,27 @@ void wxDialogWithHelpers::Init()
// an updated version will fix it later. I tried to fix it using a manual Connect but it
// didn't do any good. (problem could also be my Co-Linux / x-window manager)
//Connect( wxEVT_ACTIVATE, wxActivateEventHandler(wxDialogWithHelpers::OnActivate) );
Connect( pxEvt_OnDialogCreated, wxCommandEventHandler (wxDialogWithHelpers::OnDialogCreated) );
Connect( wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (wxDialogWithHelpers::OnOkCancel) );
Connect( wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (wxDialogWithHelpers::OnOkCancel) );
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler (wxDialogWithHelpers::OnCloseWindow) );
wxCommandEvent createEvent( pxEvt_OnDialogCreated );
createEvent.SetId( GetId() );
AddPendingEvent( createEvent );
}
void wxDialogWithHelpers::OnDialogCreated( wxCommandEvent& evt )
{
evt.Skip();
if( (evt.GetId() == GetId()) && !GetDialogName().IsEmpty() )
SetName( L"Dialog:" + GetDialogName() );
}
wxString wxDialogWithHelpers::GetDialogName() const
{
return wxEmptyString;
}
void wxDialogWithHelpers::SmartCenterFit()
@ -221,12 +237,6 @@ void wxDialogWithHelpers::OnOkCancel( wxCommandEvent& evt )
evt.Skip();
}
void wxDialogWithHelpers::OnActivate(wxActivateEvent& evt)
{
//evt.Skip();
}
void wxDialogWithHelpers::AddOkCancel( wxSizer &sizer, bool hasApply )
{
wxStdDialogButtonSizer& s_buttons( *new wxStdDialogButtonSizer() );

View File

@ -24,7 +24,6 @@ class BaseApplicableConfigPanel;
class BaseApplicableDialog;
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE( pxEvt_OnWindowCreated, -1 )
DECLARE_EVENT_TYPE( pxEvt_ApplySettings, -1 )
END_DECLARE_EVENT_TYPES()
@ -138,7 +137,6 @@ protected:
BaseApplicableDialog(wxWindow* parent, const wxString& title, wxOrientation sizerOrient );
void OnSettingsApplied( wxCommandEvent& evt );
void OnWindowCreated( wxCommandEvent& evt );
// Note: This method *will* be called automatically after a successful Apply, but will not
// be called after a failed Apply (canceled due to error).

View File

@ -28,7 +28,6 @@
#include <wx/filepicker.h>
#include <wx/listbook.h>
DEFINE_EVENT_TYPE( pxEvt_OnWindowCreated )
DEFINE_EVENT_TYPE( pxEvt_ApplySettings )
using namespace Panels;
@ -69,7 +68,9 @@ wxString BaseApplicableDialog::GetDialogName() const
void BaseApplicableDialog::Init()
{
Connect( pxEvt_OnWindowCreated, wxCommandEventHandler (BaseApplicableDialog::OnWindowCreated) );
SetExtraStyle(GetExtraStyle() | wxMINIMIZE_BOX );
SetExtraStyle(GetExtraStyle() & ~wxTOPLEVEL_EX_DIALOG);
Connect( pxEvt_ApplySettings, wxCommandEventHandler (BaseApplicableDialog::OnSettingsApplied) );
wxCommandEvent applyEvent( pxEvt_ApplySettings );
@ -83,12 +84,6 @@ void BaseApplicableDialog::OnSettingsApplied( wxCommandEvent& evt )
if( evt.GetId() == GetId() ) AppStatusEvent_OnSettingsApplied();
}
void BaseApplicableDialog::OnWindowCreated( wxCommandEvent& evt )
{
evt.Skip();
if( evt.GetId() == GetId() ) SetName( L"Dialog:" + GetDialogName() );
}
// --------------------------------------------------------------------------------------
// BaseConfigurationDialog Implementations

View File

@ -33,7 +33,6 @@ Panels::BaseSelectorPanel::BaseSelectorPanel( wxWindow* parent )
: BaseApplicableConfigPanel( parent, wxVERTICAL )
{
Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler (BaseSelectorPanel::OnFolderChanged) );
//Connect( wxEVT_ACTIVATE, wxActivateEventHandler (BaseSelectorPanel::OnActivate) );
Connect( wxEVT_SHOW, wxShowEventHandler (BaseSelectorPanel::OnShow) );
}
@ -41,13 +40,6 @@ Panels::BaseSelectorPanel::~BaseSelectorPanel() throw()
{
}
void Panels::BaseSelectorPanel::OnActivate(wxActivateEvent& evt)
{
evt.Skip();
if( !evt.GetActive() ) return;
OnShown();
}
void Panels::BaseSelectorPanel::OnShow(wxShowEvent& evt)
{
evt.Skip();

View File

@ -386,7 +386,6 @@ namespace Panels
protected:
virtual void DoRefresh()=0;
virtual bool ValidateEnumerationStatus()=0;
void OnActivate(wxActivateEvent& evt);
void OnShow(wxShowEvent& evt);
};

View File

@ -85,10 +85,10 @@ wxString MemoryCardListView_Simple::OnGetItemText(long item, long column) const
{
case McdColS_PortSlot: return wxsFormat( L"%u/%u", m_CardProvider->GetPort(item)+1, m_CardProvider->GetSlot(item)+1);
case McdColS_Status: return it.IsPresent ? ( it.IsEnabled ? _("Enabled") : _("Disabled")) : _("Missing");
case McdColS_Size: return it.IsPresent ? wxsFormat( L"%u MB", it.SizeInMB ) : wxT("N/A");
case McdColS_Size: return it.IsPresent ? wxsFormat( L"%u MB", it.SizeInMB ) : (wxString)_("N/A");
case McdColS_Formatted: return it.IsFormatted ? _("Yes") : _("No");
case McdColS_DateModified: return it.DateModified.FormatDate();
case McdColS_DateCreated: return it.DateCreated.FormatDate();
case McdColS_DateModified: return it.IsPresent ? it.DateModified.FormatDate() : (wxString)_("N/A");
case McdColS_DateCreated: return it.IsPresent ? it.DateCreated.FormatDate() : (wxString)_("N/A");
//case McdCol_Path: return it.Filename.GetPath();
}

View File

@ -30,14 +30,14 @@
// ---------------------------------------------------------------------------------
// Code 'Borrowed' from Microsoft's DXGI sources -- Modified to suit our needs. --air
static IDXGIFactory* m_DXGIFactory = NULL;
static bool m_D3D11Available = false;
static IDXGIFactory* m_DXGIFactory = NULL;
static bool m_D3D11Available = false;
static HMODULE s_hModD3D11 = NULL;
static FnPtr_D3D11CreateDevice s_DynamicD3D11CreateDevice = NULL;
static FnPtr_D3D11CreateDevice s_DynamicD3D11CreateDevice = NULL;
static HMODULE s_hModDXGI = NULL;
static FnPtr_CreateDXGIFactory s_DynamicCreateDXGIFactory = NULL;
static FnPtr_CreateDXGIFactory s_DynamicCreateDXGIFactory = NULL;
static bool DXUT_EnsureD3D11APIs( void )
@ -63,7 +63,7 @@ static bool DXUT_EnsureD3D11APIs( void )
if( s_hModD3D11 != NULL )
{
s_DynamicD3D11CreateDevice = (FnPtr_D3D11CreateDevice)GetProcAddress( s_hModD3D11, "D3D11CreateDevice" );
s_DynamicD3D11CreateDevice = (FnPtr_D3D11CreateDevice)GetProcAddress( s_hModD3D11, "D3D11CreateDevice" );
}
return ( s_DynamicD3D11CreateDevice != NULL );
@ -181,6 +181,8 @@ bool GSDevice11::Create(GSWnd* wnd)
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, levels, countof(levels), D3D11_SDK_VERSION, &scd, &m_swapchain, &m_dev, &level, &m_ctx);
// hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_REFERENCE, NULL, flags, NULL, 0, D3D11_SDK_VERSION, &scd, &m_swapchain, &m_dev, &level, &m_ctx);
//return false;
if(FAILED(hr)) return false;
if(!SetFeatureLevel(level, true))

View File

@ -200,7 +200,7 @@ void SndBuffer::UpdateTempoChangeSoundTouch()
}
}
extern int TickInterval;
extern uint TickInterval;
void SndBuffer::UpdateTempoChangeAsyncMixing()
{
float statusPct = GetStatusPct();

View File

@ -269,7 +269,7 @@ void V_Voice::Stop()
ADSR.Phase = 0;
}
int TickInterval = 768;
uint TickInterval = 768;
static const int SanityInterval = 4800;
//#define USE_ASYNC_MIXING