From 44e671bb0a8ab2ec30383cce031e05acc3584d8d Mon Sep 17 00:00:00 2001 From: Jason Brown Date: Sat, 10 Dec 2016 03:58:45 +0000 Subject: [PATCH] Add an RGBA getter for ConsoleColors --- pcsx2/gui/ConsoleLogger.cpp | 5 +++++ pcsx2/gui/ConsoleLogger.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/pcsx2/gui/ConsoleLogger.cpp b/pcsx2/gui/ConsoleLogger.cpp index 02978fb487..d26f12b5fd 100644 --- a/pcsx2/gui/ConsoleLogger.cpp +++ b/pcsx2/gui/ConsoleLogger.cpp @@ -231,6 +231,11 @@ void ConsoleLogFrame::ColorArray::SetFont( const wxFont& font ) // m_table[i].SetFont( font ); } +u32 ConsoleLogFrame::ColorArray::GetRGBA( const ConsoleColors color ) +{ + return m_table[color].GetTextColour().GetRGBA(); +} + enum MenuIDs_t { MenuId_FontSize_Small = 0x10, diff --git a/pcsx2/gui/ConsoleLogger.h b/pcsx2/gui/ConsoleLogger.h index ef07c5af8c..41f1aabbb8 100644 --- a/pcsx2/gui/ConsoleLogger.h +++ b/pcsx2/gui/ConsoleLogger.h @@ -108,6 +108,7 @@ protected: void SetFont( const wxFont& font ); void SetFont( int fontsize ); + u32 GetRGBA( const ConsoleColors color ); const wxTextAttr& operator[]( ConsoleColors coloridx ) const { @@ -184,6 +185,7 @@ public: // Retrieves the current configuration options settings for this box. // (settings change if the user moves the window or changes the font size) const ConLogConfig& GetConfig() const { return m_conf; } + u32 GetRGBA( const ConsoleColors color ) { return m_ColorTable.GetRGBA( color ); } bool Write( ConsoleColors color, const wxString& text ); bool Newline();