GUI fixes

This commit is contained in:
Nekotekina 2015-11-26 10:37:53 +03:00
parent f3311bb5e5
commit b18e337781
16 changed files with 30 additions and 26 deletions

View File

@ -6,10 +6,6 @@
#include "rpcs3.h" #include "rpcs3.h"
#include "Utilities/Timer.h" #include "Utilities/Timer.h"
#ifndef _WIN32
#include "frame_icon.xpm"
#endif
BEGIN_EVENT_TABLE(GSFrame, wxFrame) BEGIN_EVENT_TABLE(GSFrame, wxFrame)
EVT_PAINT(GSFrame::OnPaint) EVT_PAINT(GSFrame::OnPaint)
EVT_SIZE(GSFrame::OnSize) EVT_SIZE(GSFrame::OnSize)
@ -17,7 +13,7 @@ END_EVENT_TABLE()
GSFrame::GSFrame(const wxString& title) : wxFrame(nullptr, wxID_ANY, "GSFrame[" + title + "]") GSFrame::GSFrame(const wxString& title) : wxFrame(nullptr, wxID_ANY, "GSFrame[" + title + "]")
{ {
SetIcon(wxICON(frame_icon)); SetIcon(wxGetApp().m_MainFrame->GetIcon());
CellVideoOutResolution res = ResolutionTable[ResolutionIdToNum((u32)rpcs3::state.config.rsx.resolution.value())]; CellVideoOutResolution res = ResolutionTable[ResolutionIdToNum((u32)rpcs3::state.config.rsx.resolution.value())];
SetClientSize(res.width, res.height); SetClientSize(res.width, res.height);

View File

@ -23,7 +23,7 @@
#include "KernelExplorer.h" #include "KernelExplorer.h"
KernelExplorer::KernelExplorer(wxWindow* parent) KernelExplorer::KernelExplorer(wxWindow* parent)
: wxFrame(parent, wxID_ANY, "Kernel Explorer", wxDefaultPosition, wxSize(700, 450)) : wxDialog(parent, wxID_ANY, "Kernel Explorer", wxDefaultPosition, wxSize(700, 450))
{ {
this->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows this->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows
wxBoxSizer* s_panel = new wxBoxSizer(wxVERTICAL); wxBoxSizer* s_panel = new wxBoxSizer(wxVERTICAL);

View File

@ -2,7 +2,7 @@
#include <wx/treectrl.h> #include <wx/treectrl.h>
class KernelExplorer : public wxFrame class KernelExplorer : public wxDialog
{ {
wxTreeCtrl* m_tree; wxTreeCtrl* m_tree;

View File

@ -8,7 +8,8 @@
#include "Emu/state.h" #include "Emu/state.h"
#include "Emu/FS/VFS.h" #include "Emu/FS/VFS.h"
LLEModulesManagerFrame::LLEModulesManagerFrame(wxWindow* parent) : wxFrame(parent, wxID_ANY, "LLEModulesManagerFrame") LLEModulesManagerFrame::LLEModulesManagerFrame(wxWindow* parent)
: wxDialog(parent, wxID_ANY, "LLEModulesManagerFrame", wxDefaultPosition, wxSize(480, 640))
{ {
wxBoxSizer *s_panel = new wxBoxSizer(wxVERTICAL); wxBoxSizer *s_panel = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *s_p_panel = new wxBoxSizer(wxVERTICAL); wxBoxSizer *s_p_panel = new wxBoxSizer(wxVERTICAL);

View File

@ -2,7 +2,7 @@
#include "Gui/FrameBase.h" #include "Gui/FrameBase.h"
#include <wx/checklst.h> #include <wx/checklst.h>
class LLEModulesManagerFrame : public wxFrame class LLEModulesManagerFrame : public wxDialog
{ {
wxCheckListBox *m_check_list; wxCheckListBox *m_check_list;
std::vector<std::string> m_funcs; std::vector<std::string> m_funcs;

View File

@ -9,7 +9,7 @@
#include <wx/notebook.h> #include <wx/notebook.h>
MemoryStringSearcher::MemoryStringSearcher(wxWindow* parent) MemoryStringSearcher::MemoryStringSearcher(wxWindow* parent)
: wxFrame(parent, wxID_ANY, "String Searcher", wxDefaultPosition, wxSize(545, 64)) : wxDialog(parent, wxID_ANY, "String Searcher", wxDefaultPosition, wxSize(545, 64))
, exit(false) , exit(false)
{ {
this->SetBackgroundColour(wxColour(240,240,240)); this->SetBackgroundColour(wxColour(240,240,240));

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <wx/listctrl.h> #include <wx/listctrl.h>
class MemoryStringSearcher : public wxFrame class MemoryStringSearcher : public wxDialog
{ {
wxTextCtrl* t_addr; wxTextCtrl* t_addr;
wxBoxSizer* s_panel; wxBoxSizer* s_panel;

View File

@ -5,7 +5,7 @@
#include "MemoryViewer.h" #include "MemoryViewer.h"
MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent) MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
: wxFrame(parent, wxID_ANY, "Memory Viewer", wxDefaultPosition, wxSize(700, 450)) : wxDialog(parent, wxID_ANY, "Memory Viewer", wxDefaultPosition, wxSize(700, 450))
{ {
exit = false; exit = false;
m_addr = 0; m_addr = 0;
@ -22,7 +22,7 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
wxStaticBoxSizer* s_tools_mem = new wxStaticBoxSizer(wxHORIZONTAL, this, "Memory Viewer Options"); wxStaticBoxSizer* s_tools_mem = new wxStaticBoxSizer(wxHORIZONTAL, this, "Memory Viewer Options");
wxStaticBoxSizer* s_tools_mem_addr = new wxStaticBoxSizer(wxHORIZONTAL, this, "Address"); wxStaticBoxSizer* s_tools_mem_addr = new wxStaticBoxSizer(wxHORIZONTAL, this, "Address");
t_addr = new wxTextCtrl(this, wxID_ANY, "00000000", wxDefaultPosition, wxSize(60, -1)); t_addr = new wxTextCtrl(this, wxID_ANY, "00000000", wxDefaultPosition, wxSize(60, -1), wxTE_PROCESS_ENTER);
t_addr->SetMaxLength(8); t_addr->SetMaxLength(8);
s_tools_mem_addr->Add(t_addr); s_tools_mem_addr->Add(t_addr);
@ -124,8 +124,8 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
//Events //Events
t_addr ->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsAddr, this); t_addr ->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsAddr, this);
sc_bytes->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsBytes, this); sc_bytes->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsBytes, this);
t_addr ->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsAddr, this); //t_addr ->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsAddr, this);
sc_bytes->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsBytes, this); //sc_bytes->Bind(wxEVT_TEXT_ENTER, &MemoryViewerPanel::OnChangeToolsBytes, this);
sc_bytes->Bind(wxEVT_SPINCTRL, &MemoryViewerPanel::OnChangeToolsBytes, this); sc_bytes->Bind(wxEVT_SPINCTRL, &MemoryViewerPanel::OnChangeToolsBytes, this);
b_prev ->Bind(wxEVT_BUTTON, &MemoryViewerPanel::Prev, this); b_prev ->Bind(wxEVT_BUTTON, &MemoryViewerPanel::Prev, this);
@ -225,8 +225,7 @@ void MemoryViewerPanel::ShowImage(wxWindow* parent, u32 addr, int mode, u32 widt
{ {
wxString title = wxString::Format("Raw Image @ 0x%x", addr); wxString title = wxString::Format("Raw Image @ 0x%x", addr);
wxFrame* f_image_viewer = new wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDialog* f_image_viewer = new wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxMINIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN);
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN);
f_image_viewer->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows f_image_viewer->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows
f_image_viewer->SetAutoLayout(true); f_image_viewer->SetAutoLayout(true);
f_image_viewer->SetClientSize(wxSize(width, height)); f_image_viewer->SetClientSize(wxSize(width, height));

View File

@ -2,7 +2,7 @@
#include <wx/listctrl.h> #include <wx/listctrl.h>
class MemoryViewerPanel : public wxFrame class MemoryViewerPanel : public wxDialog
{ {
u32 m_addr; u32 m_addr;
u32 m_colcount; u32 m_colcount;

View File

@ -28,10 +28,10 @@ void MsgDialogFrame::Create(const std::string& msg)
m_button_yes = nullptr; m_button_yes = nullptr;
m_button_no = nullptr; m_button_no = nullptr;
m_dialog = new wxDialog(nullptr, wxID_ANY, type.se_normal ? "" : "Error", wxDefaultPosition, wxDefaultSize); m_dialog = new wxDialog(nullptr, wxID_ANY, type.se_normal ? "Normal dialog" : "Error dialog", wxDefaultPosition, wxDefaultSize);
m_dialog->SetExtraStyle(m_dialog->GetExtraStyle() | wxWS_EX_TRANSIENT); m_dialog->SetExtraStyle(m_dialog->GetExtraStyle() | wxWS_EX_TRANSIENT);
m_dialog->SetTransparent(type.bg_invisible ? 255 : 160); m_dialog->SetTransparent(type.bg_invisible ? 255 : 192);
m_sizer1 = new wxBoxSizer(wxVERTICAL); m_sizer1 = new wxBoxSizer(wxVERTICAL);

View File

@ -28,7 +28,7 @@ enum GCMEnumTypes
}; };
RSXDebugger::RSXDebugger(wxWindow* parent) RSXDebugger::RSXDebugger(wxWindow* parent)
: wxFrame(parent, wxID_ANY, "RSX Debugger", wxDefaultPosition, wxSize(700, 450)) : wxDialog(parent, wxID_ANY, "RSX Debugger", wxDefaultPosition, wxSize(700, 450))
, m_item_count(37) , m_item_count(37)
, m_addr(0x0) , m_addr(0x0)
, m_cur_texture(0) , m_cur_texture(0)

View File

@ -2,7 +2,7 @@
#include <wx/listctrl.h> #include <wx/listctrl.h>
class RSXDebugger : public wxFrame class RSXDebugger : public wxDialog
{ {
u32 m_addr; u32 m_addr;

View File

@ -345,8 +345,10 @@
<ClInclude Include="Gui\KernelExplorer.h" /> <ClInclude Include="Gui\KernelExplorer.h" />
<ClInclude Include="Gui\LLEModulesManager.h" /> <ClInclude Include="Gui\LLEModulesManager.h" />
<ClInclude Include="Gui\MainFrame.h" /> <ClInclude Include="Gui\MainFrame.h" />
<ClInclude Include="Gui\MemoryStringSearcher.h" />
<ClInclude Include="Gui\MemoryViewer.h" /> <ClInclude Include="Gui\MemoryViewer.h" />
<ClInclude Include="Gui\MsgDialog.h" /> <ClInclude Include="Gui\MsgDialog.h" />
<ClInclude Include="Gui\PADManager.h" />
<ClInclude Include="Gui\RegisterEditor.h" /> <ClInclude Include="Gui\RegisterEditor.h" />
<ClInclude Include="Gui\RSXDebugger.h" /> <ClInclude Include="Gui\RSXDebugger.h" />
<ClInclude Include="Gui\SaveDataDialog.h" /> <ClInclude Include="Gui\SaveDataDialog.h" />

View File

@ -219,6 +219,12 @@
<ClInclude Include="Gui\SignInDialog.h"> <ClInclude Include="Gui\SignInDialog.h">
<Filter>Gui</Filter> <Filter>Gui</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Gui\MemoryStringSearcher.h">
<Filter>Gui</Filter>
</ClInclude>
<ClInclude Include="Gui\PADManager.h">
<Filter>Gui</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="rpcs3.ico" /> <Image Include="rpcs3.ico" />