From 65e75523bb0f2720dac8808856e0a13d3ead8ad4 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Fri, 11 Sep 2020 12:52:19 +0200 Subject: [PATCH] Change button name --- editor/src/editor/Editor.cpp | 12 ++++++------ editor/src/editor/GUIComponents.cpp | 6 +++--- editor/src/editor/GUIComponents.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/editor/src/editor/Editor.cpp b/editor/src/editor/Editor.cpp index dc46b41a..24503d1e 100644 --- a/editor/src/editor/Editor.cpp +++ b/editor/src/editor/Editor.cpp @@ -373,11 +373,11 @@ void Editor::Impl::createFrameContents() typedef CTextButton Button; #endif typedef CTextButton ValueButton; - typedef CHoverButton LoadFileButton; - typedef CHoverButton CCButton; - typedef CHoverButton HomeButton; - typedef CHoverButton SettingsButton; - typedef CHoverButton EditFileButton; + typedef SHoverButton LoadFileButton; + typedef SHoverButton CCButton; + typedef SHoverButton HomeButton; + typedef SHoverButton SettingsButton; + typedef SHoverButton EditFileButton; typedef SPiano Piano; auto createLogicalGroup = [](const CRect& bounds, int, const char*, CHoriTxtAlign, int) { @@ -480,7 +480,7 @@ void Editor::Impl::createFrameContents() return vm; }; auto createGlyphButton = [this, &theme](UTF8StringPtr glyph, const CRect& bounds, int tag, int fontsize) { - CHoverButton* btn = new CHoverButton(bounds, this, tag, glyph); + SHoverButton* btn = new SHoverButton(bounds, this, tag, glyph); btn->setFont(new CFontDesc("Fluent System Regular W20", fontsize)); btn->setTextColor(theme->icon); btn->setHoverColor(theme->iconHighlight); diff --git a/editor/src/editor/GUIComponents.cpp b/editor/src/editor/GUIComponents.cpp index cf344489..84afec45 100644 --- a/editor/src/editor/GUIComponents.cpp +++ b/editor/src/editor/GUIComponents.cpp @@ -428,19 +428,19 @@ void SValueMenu::onItemClicked(int32_t index) valueChanged(); } -void CHoverButton::setHoverColor (const CColor& color) +void SHoverButton::setHoverColor (const CColor& color) { hoverColor_ = color; } -CMouseEventResult CHoverButton::onMouseEntered (CPoint& where, const CButtonState& buttons) +CMouseEventResult SHoverButton::onMouseEntered (CPoint& where, const CButtonState& buttons) { backupColor_ = getTextColor(); setTextColor(hoverColor_); return CTextButton::onMouseEntered(where, buttons); } -CMouseEventResult CHoverButton::onMouseExited (CPoint& where, const CButtonState& buttons) +CMouseEventResult SHoverButton::onMouseExited (CPoint& where, const CButtonState& buttons) { setTextColor(backupColor_); return CTextButton::onMouseExited(where, buttons); diff --git a/editor/src/editor/GUIComponents.h b/editor/src/editor/GUIComponents.h index 6b970864..31d14bae 100644 --- a/editor/src/editor/GUIComponents.h +++ b/editor/src/editor/GUIComponents.h @@ -149,9 +149,9 @@ private: }; /// -class CHoverButton: public CTextButton { +class SHoverButton: public CTextButton { public: - CHoverButton(const CRect& size, IControlListener* listener = nullptr, int32_t tag = -1, UTF8StringPtr title = nullptr) + SHoverButton(const CRect& size, IControlListener* listener = nullptr, int32_t tag = -1, UTF8StringPtr title = nullptr) : CTextButton(size, listener, tag, title) {} void setHoverColor(const CColor& color);