From: <mar...@us...> - 2014-08-29 11:52:58
|
Revision: 7670 http://sourceforge.net/p/freeorion/code/7670 Author: marcel_metz Date: 2014-08-29 11:52:55 +0000 (Fri, 29 Aug 2014) Log Message: ----------- Removed position parameter from GG::Edit. Modified Paths: -------------- trunk/FreeOrion/GG/GG/Edit.h trunk/FreeOrion/GG/src/Edit.cpp trunk/FreeOrion/GG/src/MultiEdit.cpp trunk/FreeOrion/GG/src/StyleFactory.cpp trunk/FreeOrion/UI/CUIControls.cpp Modified: trunk/FreeOrion/GG/GG/Edit.h =================================================================== --- trunk/FreeOrion/GG/GG/Edit.h 2014-08-29 11:52:33 UTC (rev 7669) +++ trunk/FreeOrion/GG/GG/Edit.h 2014-08-29 11:52:55 UTC (rev 7670) @@ -70,7 +70,7 @@ /** \name Structors */ ///@{ /** Ctor. Height is determined from the font and point size used. */ - Edit(X x, Y y, X w, const std::string& str, const boost::shared_ptr<Font>& font, Clr color, + Edit(const std::string& str, const boost::shared_ptr<Font>& font, Clr color, Clr text_color = CLR_BLACK, Clr interior = CLR_ZERO); //@} Modified: trunk/FreeOrion/GG/src/Edit.cpp =================================================================== --- trunk/FreeOrion/GG/src/Edit.cpp 2014-08-29 11:52:33 UTC (rev 7669) +++ trunk/FreeOrion/GG/src/Edit.cpp 2014-08-29 11:52:55 UTC (rev 7670) @@ -59,9 +59,9 @@ // static(s) const int Edit::PIXEL_MARGIN = 5; -Edit::Edit(X x, Y y, X w, const std::string& str, const boost::shared_ptr<Font>& font, Clr color, +Edit::Edit(const std::string& str, const boost::shared_ptr<Font>& font, Clr color, Clr text_color/* = CLR_BLACK*/, Clr interior/* = CLR_ZERO*/) : - TextControl(x, y, w, HeightFromFont(font, PIXEL_MARGIN), str, font, text_color, FORMAT_LEFT | FORMAT_IGNORETAGS, INTERACTIVE | REPEAT_KEY_PRESS), + TextControl(X0, Y0, X1, HeightFromFont(font, PIXEL_MARGIN), str, font, text_color, FORMAT_LEFT | FORMAT_IGNORETAGS, INTERACTIVE | REPEAT_KEY_PRESS), m_cursor_pos(CP0, CP0), m_last_button_down_time(0), m_in_double_click_mode(false), Modified: trunk/FreeOrion/GG/src/MultiEdit.cpp =================================================================== --- trunk/FreeOrion/GG/src/MultiEdit.cpp 2014-08-29 11:52:33 UTC (rev 7669) +++ trunk/FreeOrion/GG/src/MultiEdit.cpp 2014-08-29 11:52:55 UTC (rev 7670) @@ -104,7 +104,7 @@ MultiEdit::MultiEdit(const std::string& str, const boost::shared_ptr<Font>& font, Clr color, Flags<MultiEditStyle> style/* = MULTI_LINEWRAP*/, Clr text_color/* = CLR_BLACK*/, Clr interior/* = CLR_ZERO*/) : - Edit(X0, Y0, X1, str, font, color, text_color, interior), + Edit(str, font, color, text_color, interior), m_style(style), m_cursor_begin(0, CP0), m_cursor_end(0, CP0), Modified: trunk/FreeOrion/GG/src/StyleFactory.cpp =================================================================== --- trunk/FreeOrion/GG/src/StyleFactory.cpp 2014-08-29 11:52:33 UTC (rev 7669) +++ trunk/FreeOrion/GG/src/StyleFactory.cpp 2014-08-29 11:52:55 UTC (rev 7670) @@ -90,7 +90,7 @@ Edit* StyleFactory::NewEdit(const std::string& str, const boost::shared_ptr<Font>& font, Clr color, Clr text_color/* = CLR_BLACK*/, Clr interior/* = CLR_ZERO*/) const -{ return new Edit(X0, Y0, X1, str, font, color, text_color, interior); } +{ return new Edit(str, font, color, text_color, interior); } ListBox* StyleFactory::NewListBox(Clr color, Clr interior/* = CLR_ZERO*/) const { return new ListBox(color, interior); } Modified: trunk/FreeOrion/UI/CUIControls.cpp =================================================================== --- trunk/FreeOrion/UI/CUIControls.cpp 2014-08-29 11:52:33 UTC (rev 7669) +++ trunk/FreeOrion/UI/CUIControls.cpp 2014-08-29 11:52:55 UTC (rev 7670) @@ -701,7 +701,7 @@ // class CUIEdit /////////////////////////////////////// CUIEdit::CUIEdit(const std::string& str) : - Edit(GG::X0, GG::Y0, GG::X1, str, ClientUI::GetFont(), ClientUI::CtrlBorderColor(), ClientUI::TextColor(), ClientUI::CtrlColor()) + Edit(str, ClientUI::GetFont(), ClientUI::CtrlBorderColor(), ClientUI::TextColor(), ClientUI::CtrlColor()) { GG::Connect(EditedSignal, &PlayTextTypingSound, -1); SetHiliteColor(ClientUI::EditHiliteColor()); |