From 29fbf12e905cd3b4148949bbfb59f625ec4633d8 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Tue, 13 Aug 2013 11:37:02 +0300 Subject: [PATCH] Move E() from joystick code to general text panel code --- include/platform/wxwidgets/textrender.hpp | 7 +++++++ src/platform/wxwidgets/settings-joysticks.cpp | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/platform/wxwidgets/textrender.hpp b/include/platform/wxwidgets/textrender.hpp index ce0111f8..d7c80f34 100644 --- a/include/platform/wxwidgets/textrender.hpp +++ b/include/platform/wxwidgets/textrender.hpp @@ -32,6 +32,13 @@ struct text_framebuffer size_t write(const std::string& str, size_t w, size_t x, size_t y, uint32_t fg, uint32_t bg); size_t write(const std::u32string& str, size_t w, size_t x, size_t y, uint32_t fg, uint32_t bg); static size_t text_width(const std::string& text); + element E(char32_t ch, uint32_t fg, uint32_t bg) + { + element e; + e.ch = ch; + e.fg = fg; + e.bg = bg; + } private: std::vector buffer; size_t width; diff --git a/src/platform/wxwidgets/settings-joysticks.cpp b/src/platform/wxwidgets/settings-joysticks.cpp index 1974eca4..c060234e 100644 --- a/src/platform/wxwidgets/settings-joysticks.cpp +++ b/src/platform/wxwidgets/settings-joysticks.cpp @@ -329,14 +329,6 @@ namespace return U' '; return U'0' + ((val / div) % 10); } - text_framebuffer::element E(char32_t ch, unsigned fg, unsigned bg) - { - text_framebuffer::element e; - e.ch = ch; - e.fg = fg; - e.bg = bg; - return e; - } }; class joystick_config_window : public settings_tab