mirror of https://github.com/PCSX2/pcsx2.git
* UI: Many small fixes for badly sized popups and confirmations.
* Includes possible fix for Issue 743 (AMD cpu core counts). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3184 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
ec989a50cf
commit
91454bfb12
|
@ -405,12 +405,6 @@
|
|||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
// control within it's containing sizer. If both alignment flags do not match the result
|
||||
// is typically undesirable.
|
||||
//
|
||||
class pxStaticText : public wxWindow
|
||||
class pxStaticText : public wxControl
|
||||
{
|
||||
typedef wxWindow _parent;
|
||||
typedef wxControl _parent;
|
||||
|
||||
protected:
|
||||
wxString m_label;
|
||||
|
@ -66,7 +66,6 @@ public:
|
|||
wxFont GetFontOk() const;
|
||||
bool Enable( bool enabled=true );
|
||||
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const { return m_label; }
|
||||
|
||||
|
@ -115,3 +114,19 @@ public:
|
|||
protected:
|
||||
void SetPaddingDefaults();
|
||||
};
|
||||
|
||||
extern void operator+=( wxSizer& target, pxStaticText* src );
|
||||
extern void operator+=( wxSizer& target, pxStaticText& src );
|
||||
extern void operator+=( wxSizer* target, pxStaticText& src );
|
||||
|
||||
template<>
|
||||
inline void operator+=( wxSizer& target, const pxWindowAndFlags<pxStaticText>& src )
|
||||
{
|
||||
target.Add( src.window, src.flags );
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void operator+=( wxSizer* target, const pxWindowAndFlags<pxStaticText>& src )
|
||||
{
|
||||
target->Add( src.window, src.flags );
|
||||
}
|
||||
|
|
|
@ -554,6 +554,8 @@ public:
|
|||
|
||||
wxDialogWithHelpers& SetMinWidth( int newWidth );
|
||||
wxDialogWithHelpers& SetMinHeight( int newHeight );
|
||||
|
||||
int GetCharHeight() const;
|
||||
|
||||
protected:
|
||||
void OnDialogCreated( wxCommandEvent& evt );
|
||||
|
|
|
@ -86,12 +86,6 @@ bool pxCheckBox::GetValue() const
|
|||
return m_checkbox->GetValue();
|
||||
}
|
||||
|
||||
void operator+=( wxSizer& target, pxCheckBox* src )
|
||||
{
|
||||
if( !pxAssert( src != NULL ) ) return;
|
||||
target.Add( src, pxExpand );
|
||||
}
|
||||
|
||||
// Forwards checkbox actions on the internal checkbox (called 'checkpart') to listeners
|
||||
// bound to the pxCheckBox "parent" panel. This helps the pxCheckBox behave more like a
|
||||
// traditional checkbox.
|
||||
|
@ -112,6 +106,11 @@ void pxCheckBox::OnSubtextClicked( wxCommandEvent& evt )
|
|||
// the checkmark. Not sure if that's desirable.
|
||||
}
|
||||
|
||||
void operator+=( wxSizer& target, pxCheckBox* src )
|
||||
{
|
||||
if( src ) target.Add( src, pxExpand );
|
||||
}
|
||||
|
||||
void operator+=( wxSizer& target, pxCheckBox& src )
|
||||
{
|
||||
target.Add( &src, pxExpand );
|
||||
|
|
|
@ -257,6 +257,7 @@ void pxStaticText::SetLabel(const wxString& label)
|
|||
|
||||
// Always update wrapping, in case window width or something else also changed.
|
||||
UpdateWrapping( labelChanged );
|
||||
InvalidateBestSize();
|
||||
}
|
||||
|
||||
wxFont pxStaticText::GetFontOk() const
|
||||
|
@ -321,7 +322,7 @@ wxSize pxStaticText::DoGetBestSize() const
|
|||
if( m_autowrap )
|
||||
{
|
||||
best = GetBestWrappedSize(dc);
|
||||
best.x = wxDefaultCoord;
|
||||
//best.x = wxDefaultCoord;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -357,3 +358,17 @@ void pxStaticHeading::SetPaddingDefaults()
|
|||
m_paddingPct_vert = 0.0f;
|
||||
}
|
||||
|
||||
void operator+=( wxSizer& target, pxStaticText* src )
|
||||
{
|
||||
if( src ) target.Add( src, pxExpand );
|
||||
}
|
||||
|
||||
void operator+=( wxSizer& target, pxStaticText& src )
|
||||
{
|
||||
target.Add( &src, pxExpand );
|
||||
}
|
||||
|
||||
void operator+=( wxSizer* target, pxStaticText& src )
|
||||
{
|
||||
target->Add( &src, pxExpand );
|
||||
}
|
||||
|
|
|
@ -370,6 +370,11 @@ wxDialogWithHelpers& wxDialogWithHelpers::SetMinHeight( int newHeight )
|
|||
return *this;
|
||||
}
|
||||
|
||||
int wxDialogWithHelpers::GetCharHeight() const
|
||||
{
|
||||
return wxClientDC( const_cast<wxDialogWithHelpers*>(this) ).GetCharHeight();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// wxPanelWithHelpers Implementations
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -159,6 +159,12 @@ void x86capabilities::CountCores()
|
|||
{
|
||||
__cpuid( regs, 0x80000008 );
|
||||
PhysicalCoresPerPhysicalCPU += ( regs[2] ) & 0xff;
|
||||
|
||||
// AMD note: they don't support hyperthreading, but they like to flag this true
|
||||
// anyway. Let's force-unflag it until we come up with a better solution.
|
||||
// (note: seems to affect some Phenom II's only? -- Athlon X2's and PhenomI's do
|
||||
// not seem to do this) --air
|
||||
hasMultiThreading = 0;
|
||||
}
|
||||
|
||||
if( !hasMultiThreading || LogicalCoresPerPhysicalCPU == 0 )
|
||||
|
|
|
@ -32,7 +32,9 @@ void hwInit()
|
|||
{
|
||||
// [TODO] / FIXME: PCSX2 no longer works on an Init system. It assumes that the
|
||||
// static global vars for the process will be initialized when the process is created, and
|
||||
// then issues *resets only* from then on. All PCSX2
|
||||
// then issues *resets only* from then on. (reset code for various S2 components should do
|
||||
// NULL checks and allocate memory and such if the pointers are NULL only).
|
||||
|
||||
if( hwInitialized ) return;
|
||||
|
||||
VifUnpackSSE_Init();
|
||||
|
|
|
@ -91,9 +91,9 @@ Dialogs::AboutBoxDialog::AboutBoxDialog( wxWindow* parent )
|
|||
// Main (top-level) layout
|
||||
|
||||
*this += StdPadding;
|
||||
*this += Text(_("PCSX2")).Bold() | pxExpand;
|
||||
*this += Text(_("A Playstation 2 Emulator")) | pxExpand;
|
||||
*this += AuthLogoSizer | StdExpand();
|
||||
*this += Text(_("PCSX2")).Bold();
|
||||
*this += Text(_("A Playstation 2 Emulator"));
|
||||
*this += AuthLogoSizer | StdExpand();
|
||||
|
||||
*this += new wxHyperlinkCtrl( this, wxID_ANY,
|
||||
_("PCSX2 Official Website and Forums"), L"http://www.pcsx2.net"
|
||||
|
|
|
@ -143,6 +143,8 @@ void MsgButtons::SetBestFocus( wxWindow* dialog ) const
|
|||
|
||||
wxWindowID pxIssueConfirmation( wxDialogWithHelpers& confirmDlg, const MsgButtons& buttons )
|
||||
{
|
||||
if( confirmDlg.GetMinWidth() <= 0 ) confirmDlg.SetMinWidth( 400 );
|
||||
|
||||
confirmDlg += new ModalButtonPanel( &confirmDlg, buttons ) | pxCenter.Border( wxTOP, 8 );
|
||||
buttons.SetBestFocus( confirmDlg );
|
||||
return confirmDlg.ShowModal();
|
||||
|
|
|
@ -69,7 +69,7 @@ FirstTimeWizard::UsermodePage::UsermodePage( wxWizard* parent ) :
|
|||
m_panel_LangSel = new LanguageSelectionPanel( &panel );
|
||||
m_panel_UserSel = new DocsFolderPickerPanel( &panel );
|
||||
|
||||
panel += panel.Heading(_("PCSX2 is starting from a new or unknown folder and needs to be configured.")).Bold() | pxExpand;
|
||||
panel += panel.Heading(_("PCSX2 is starting from a new or unknown folder and needs to be configured.")).Bold();
|
||||
|
||||
panel += m_panel_LangSel | StdCenter();
|
||||
panel += m_panel_UserSel | pxExpand.Border( wxALL, 8 );
|
||||
|
|
|
@ -63,13 +63,13 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent)
|
|||
// ------------------------------
|
||||
|
||||
for( uint i=0; i<2; ++i )
|
||||
*this += m_check_Multitap[i]| pxExpand;
|
||||
*this += m_check_Multitap[i];
|
||||
|
||||
*this += 4;
|
||||
|
||||
*this += m_check_Ejection | pxExpand;
|
||||
*this += m_check_Ejection;
|
||||
#ifdef __WXMSW__
|
||||
*this += m_check_CompressNTFS | pxExpand;
|
||||
*this += m_check_CompressNTFS;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -380,8 +380,8 @@ WaitingForThreadedTaskDialog::WaitingForThreadedTaskDialog( PersistentThread* th
|
|||
|
||||
*this += Text( content ) | StdExpand();
|
||||
*this += 15;
|
||||
*this += Heading( _("Press Cancel to attempt to cancel the action.") ) | pxExpand;
|
||||
*this += Heading( _("Press Terminate to kill PCSX2 immediately.") ) | pxExpand;
|
||||
*this += Heading( _("Press Cancel to attempt to cancel the action.") );
|
||||
*this += Heading( _("Press Terminate to kill PCSX2 immediately.") );
|
||||
|
||||
*this += new wxButton( this, wxID_CANCEL );
|
||||
*this += new wxButton( this, wxID_ANY, _("Terminate App") );
|
||||
|
|
|
@ -109,7 +109,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
|||
if (isoDetect(&iso))
|
||||
{
|
||||
Console.WriteLn( L"(Drag&Drop) Found valid ISO file type!" );
|
||||
SwapOrReset_Iso(m_WindowBound, stopped_core, filenames[0], _("You have dropped the following ISO image into PCSX2:\n\n"));
|
||||
SwapOrReset_Iso(m_WindowBound, stopped_core, filenames[0], _("You have dropped the following ISO image into PCSX2:"));
|
||||
}
|
||||
|
||||
_closefile( iso.handle );
|
||||
|
|
|
@ -136,10 +136,11 @@ wxWindowID SwapOrReset_Iso( wxWindow* owner, IScopedCoreThread& core_control, co
|
|||
core_control.DisallowResume();
|
||||
wxDialogWithHelpers dialog( owner, _("Confirm ISO image change") );
|
||||
|
||||
dialog += dialog.Heading(descpart1 +
|
||||
isoFilename + L"\n\n" +
|
||||
_("Do you want to swap discs or boot the new image (via system reset)?")
|
||||
);
|
||||
dialog += dialog.Heading(descpart1);
|
||||
dialog += dialog.GetCharHeight();
|
||||
dialog += dialog.Text(isoFilename);
|
||||
dialog += dialog.GetCharHeight();
|
||||
dialog += dialog.Heading(_("Do you want to swap discs or boot the new image (via system reset)?"));
|
||||
|
||||
result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc")), L"DragDrop:BootSwapIso" );
|
||||
if( result == wxID_CANCEL )
|
||||
|
|
|
@ -65,7 +65,7 @@ Panels::DocsFolderPickerPanel::DocsFolderPickerPanel( wxWindow* parent, bool isF
|
|||
|
||||
m_dirpicker_custom = new DirPickerPanel( this, FolderId_Documents, _("Select a document root for PCSX2") );
|
||||
|
||||
*this += Heading( isFirstTime ? usermodeExplained : usermodeWarning ) | pxExpand;
|
||||
*this += Heading( isFirstTime ? usermodeExplained : usermodeWarning );
|
||||
*this += m_radio_UserMode | StdExpand();
|
||||
*this += m_dirpicker_custom | pxExpand.Border( wxLEFT, StdPadding + m_radio_UserMode->GetIndentation() );
|
||||
*this += 4;
|
||||
|
|
Loading…
Reference in New Issue