Update copyright dates
parent
0bed6596f3
commit
e1bfb672c8
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Aurora C++ Library
|
||||
// Copyright (c) 2012-2015 Jan Haller
|
||||
// Copyright (c) 2012-2016 Jan Haller
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Aurora C++ Library
|
||||
// Copyright (c) 2012-2015 Jan Haller
|
||||
// Copyright (c) 2012-2016 Jan Haller
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -590,6 +590,9 @@ namespace tgui
|
|||
// Show animations
|
||||
std::vector<std::shared_ptr<priv::Animation>> m_showAnimations;
|
||||
|
||||
// Keeps track of when setSize is called
|
||||
bool m_sizeDefined = false;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -217,9 +217,6 @@ namespace tgui
|
|||
|
||||
// This will store the size of the text (0 to auto-size)
|
||||
unsigned int m_textSize = 0;
|
||||
|
||||
// Keeps track of when setSize is called
|
||||
bool m_sizeDefined = false;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -106,26 +106,13 @@ namespace tgui
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Returns the renderer, which gives access to functions that determine how the widget is displayed
|
||||
///
|
||||
/// @return Reference to the renderer
|
||||
/// @return Temporary pointer to the renderer
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
EditBoxRenderer* getRenderer() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Set the position of the widget
|
||||
///
|
||||
/// This function completely overwrites the previous position.
|
||||
/// See the move function to apply an offset based on the previous position instead.
|
||||
/// The default position of a transformable widget is (0, 0).
|
||||
///
|
||||
/// @param position New position
|
||||
///
|
||||
/// @see move, getPosition
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setPosition(const Layout2d& position) override;
|
||||
using Transformable::setPosition;
|
||||
EditBoxRenderer* getRenderer() const
|
||||
{
|
||||
return aurora::downcast<EditBoxRenderer*>(m_renderer.get());
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -138,17 +125,6 @@ namespace tgui
|
|||
using Transformable::setSize;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Returns the full size of the edit box
|
||||
///
|
||||
/// The size returned by this function includes the borders.
|
||||
///
|
||||
/// @return Full size of the edit box
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual sf::Vector2f getFullSize() const override;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Changes the font of the text in the widget.
|
||||
///
|
||||
|
@ -182,10 +158,7 @@ namespace tgui
|
|||
/// @return The text of the edit box.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
sf::String getText() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
sf::String getText() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -207,10 +180,7 @@ namespace tgui
|
|||
/// @return The default text of the edit box.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
sf::String getDefaultText() const
|
||||
{
|
||||
return m_defaultText.getString();
|
||||
}
|
||||
sf::String getDefaultText() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -238,10 +208,7 @@ namespace tgui
|
|||
/// @return The text size.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
unsigned int getTextSize() const
|
||||
{
|
||||
return m_textFull.getCharacterSize();
|
||||
}
|
||||
unsigned int getTextSize() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -266,10 +233,7 @@ namespace tgui
|
|||
/// When no password character is used then this function returns 0.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
char getPasswordCharacter() const
|
||||
{
|
||||
return m_passwordChar;
|
||||
}
|
||||
char getPasswordCharacter() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -292,10 +256,7 @@ namespace tgui
|
|||
/// There is no character limit by default.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
unsigned int getMaximumCharacters() const
|
||||
{
|
||||
return m_maxChars;
|
||||
}
|
||||
unsigned int getMaximumCharacters() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -313,10 +274,7 @@ namespace tgui
|
|||
/// @return Text alignment
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Alignment getAlignment()
|
||||
{
|
||||
return m_textAlignment;
|
||||
}
|
||||
Alignment getAlignment();
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -337,10 +295,7 @@ namespace tgui
|
|||
/// @return Is the text width limit or not.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool isTextWidthLimited()
|
||||
{
|
||||
return m_limitTextWidth;
|
||||
}
|
||||
bool isTextWidthLimited();
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -353,7 +308,7 @@ namespace tgui
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void setCaretPosition(std::size_t charactersBeforeCaret);
|
||||
|
||||
|
||||
/**
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief This will change the width of the caret.
|
||||
///
|
||||
|
@ -369,11 +324,8 @@ namespace tgui
|
|||
/// @return Caret width
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
float getCaretWidth()
|
||||
{
|
||||
return m_caret.getSize().x;
|
||||
}
|
||||
|
||||
float getCaretWidth();
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Define how the text input should look like
|
||||
|
@ -407,26 +359,6 @@ namespace tgui
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void selectText();
|
||||
|
||||
/**
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Changes the opacity of the widget.
|
||||
///
|
||||
/// @param opacity The opacity of the widget. 0 means completely transparent, while 1 (default) means fully opaque.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setOpacity(float opacity) override;
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Returns the distance between the position where the widget is drawn and where the widget is placed
|
||||
///
|
||||
/// This is basically the width and height of the optional borders drawn around widgets.
|
||||
///
|
||||
/// @return Offset of the widget
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual sf::Vector2f getWidgetOffset() const override;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @internal
|
||||
|
@ -579,78 +511,38 @@ namespace tgui
|
|||
bool m_possibleDoubleClick = false;
|
||||
|
||||
|
||||
friend class EditBoxRenderer;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class TGUI_API EditBoxRenderer : public WidgetRenderer/**, public WidgetBorders, public WidgetPadding*/
|
||||
class TGUI_API EditBoxRenderer : public WidgetRenderer
|
||||
{
|
||||
public:
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Constructor
|
||||
/// @brief Changes the size of the borders
|
||||
///
|
||||
/// @param editBox The edit box that is connected to the renderer
|
||||
/// @param borders Size of the borders
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
EditBoxRenderer(EditBox* editBox) : m_editBox{editBox} {}
|
||||
|
||||
/**
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Change a property of the renderer
|
||||
///
|
||||
/// @param property The property that you would like to change
|
||||
/// @param value The new serialized value that you like to assign to the property
|
||||
///
|
||||
/// @throw Exception when deserialization fails or when the widget does not have this property.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setProperty(std::string property, const std::string& value) override;
|
||||
void setBorders(const Borders& borders);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Change a property of the renderer
|
||||
/// @brief Returns the size of the borders
|
||||
///
|
||||
/// @param property The property that you would like to change
|
||||
/// @param value The new value that you like to assign to the property.
|
||||
/// The ObjectConverter is implicitly constructed from the possible value types.
|
||||
///
|
||||
/// @throw Exception for unknown properties or when value was of a wrong type.
|
||||
/// @return border size
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setProperty(std::string property, ObjectConverter&& value) override;
|
||||
Borders getBorders() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Retrieve the value of a certain property
|
||||
/// @brief Changes the padding of the edit box
|
||||
///
|
||||
/// @param property The property that you would like to retrieve
|
||||
///
|
||||
/// @return The value inside a ObjectConverter object which you can extract with the correct get function or
|
||||
/// an ObjectConverter object with type ObjectConverter::Type::None when the property did not exist.
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual ObjectConverter getProperty(std::string property) const override;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Get a map with all properties and their values
|
||||
///
|
||||
/// @return Property-value pairs of the renderer
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual std::map<std::string, ObjectConverter> getPropertyValuePairs() const override;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Changes the padding of the edit box.
|
||||
///
|
||||
/// When the text is auto-scaled then it will be drawn within the area defined by the size minus the padding.
|
||||
/// When the text is auto-scaled then it will be drawn within the area defined by the size minus the border and padding.
|
||||
/// The padding is also used to define the clipping area for when the text it too long.
|
||||
///
|
||||
/// This padding will be scaled together with the background image.
|
||||
|
@ -659,12 +551,22 @@ namespace tgui
|
|||
/// @param padding The padding width and height
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual void setPadding(const Padding& padding) override;
|
||||
using WidgetPadding::setPadding;
|
||||
*/
|
||||
virtual void setPadding(const Padding& padding);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief This will change the width of the caret.
|
||||
/// @brief Returns the size of the padding
|
||||
///
|
||||
/// @return padding size
|
||||
///
|
||||
/// @see setPadding
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Padding getPadding() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief This will change the width of the caret
|
||||
///
|
||||
/// @param width New width of the caret
|
||||
///
|
||||
|
@ -673,7 +575,16 @@ namespace tgui
|
|||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Set the text color that will be used inside the edit box.
|
||||
/// @brief Returns the caret width
|
||||
///
|
||||
/// @param width of the caret
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
float getCaretWidth() const;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Set the text color that will be used inside the edit box
|
||||
///
|
||||
/// @param textColor The new text color.
|
||||
///
|
||||
|
@ -681,6 +592,15 @@ namespace tgui
|
|||
void setTextColor(const Color& textColor);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Set the text color that will be used inside the edit box
|
||||
///
|
||||
/// @param the text color
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
sf::Color getTextColor() const;
|
||||
|
||||
/*
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Set the text color of the selected text that will be used inside the edit box.
|
||||
///
|
||||
|
@ -796,8 +716,8 @@ namespace tgui
|
|||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void setFocusTexture(const Texture& texture);
|
||||
|
||||
|
||||
*/
|
||||
/**
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Draws the widget on the render target.
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -811,14 +731,14 @@ namespace tgui
|
|||
// Returns the padding, which is possibly scaled with the background image.
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Padding getScaledPadding() const;
|
||||
|
||||
*/
|
||||
/**
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Makes a copy of the renderer
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
virtual std::shared_ptr<WidgetRenderer> clone(Widget* widget) override;
|
||||
*/
|
||||
|
||||
/**
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
protected:
|
||||
|
||||
|
@ -838,7 +758,7 @@ namespace tgui
|
|||
Texture m_textureFocused;
|
||||
|
||||
friend class EditBox;
|
||||
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
TGUI - Texus's Graphical User Interface
|
||||
---------------------------------------
|
||||
|
||||
TGUI - Copyright (c) 2012-2015 Bruno Van de Velde - vdv_b@tgui.eu
|
||||
TGUI - Copyright (c) 2012-2016 Bruno Van de Velde - vdv_b@tgui.eu
|
||||
|
||||
This software is provided 'as-is', without any express or
|
||||
implied warranty. In no event will the authors be held
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Koushtav Chakrabarty (koushtav@fleptic.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -270,6 +270,8 @@ namespace tgui
|
|||
|
||||
void Widget::setSize(const Layout2d& size)
|
||||
{
|
||||
m_sizeDefined = true;
|
||||
|
||||
if (size.x.getImpl()->parentWidget != this)
|
||||
{
|
||||
size.x.getImpl()->parentWidget = this;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -63,8 +63,6 @@ namespace tgui
|
|||
{
|
||||
Widget::setSize(size);
|
||||
|
||||
m_sizeDefined = true;
|
||||
|
||||
// Reset the texture sizes
|
||||
getRenderer()->getTextureNormal().setSize(getSize());
|
||||
getRenderer()->getTextureHover().setSize(getSize());
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -47,20 +47,19 @@ namespace tgui
|
|||
EditBox::EditBox()
|
||||
{
|
||||
m_callback.widgetType = "EditBox";
|
||||
addSignal<sf::String>("TextChanged");
|
||||
addSignal<sf::String>("ReturnKeyPressed");
|
||||
m_draggableWidget = true;
|
||||
m_allowFocus = true;
|
||||
|
||||
addSignal<sf::String>("TextChanged");
|
||||
addSignal<sf::String>("ReturnKeyPressed");
|
||||
m_renderer = aurora::makeCopied<tgui::EditBoxRenderer>();
|
||||
setRenderer(m_renderer->getData());
|
||||
|
||||
m_defaultText.setStyle(sf::Text::Italic);
|
||||
|
||||
m_caret.setSize({1, 0});
|
||||
|
||||
m_renderer = std::make_shared<EditBoxRenderer>(this);
|
||||
reload();
|
||||
m_caret.setSize({getRenderer()->getCaretWidth(), 0});
|
||||
|
||||
setSize({240, 30});
|
||||
m_sizeDefined = false;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -75,19 +74,6 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setPosition(const Layout2d& position)
|
||||
{
|
||||
Widget::setPosition(position);
|
||||
|
||||
getRenderer()->m_textureHover.setPosition(getPosition());
|
||||
getRenderer()->m_textureNormal.setPosition(getPosition());
|
||||
getRenderer()->m_textureFocused.setPosition(getPosition());
|
||||
|
||||
recalculateTextPositions();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setSize(const Layout2d& size)
|
||||
{
|
||||
Widget::setSize(size);
|
||||
|
@ -104,20 +90,13 @@ namespace tgui
|
|||
m_caret.setSize({m_caret.getSize().x,
|
||||
getSize().y - getRenderer()->getScaledPadding().bottom - getRenderer()->getScaledPadding().top});
|
||||
|
||||
///TODO
|
||||
// Recalculate the position of the images and texts
|
||||
updatePosition();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
sf::Vector2f EditBox::getFullSize() const
|
||||
{
|
||||
return {getSize().x + getRenderer()->getBorders().left + getRenderer()->getBorders().right,
|
||||
getSize().y + getRenderer()->getBorders().top + getRenderer()->getBorders().bottom};
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setFont(const Font& font)
|
||||
{
|
||||
Widget::setFont(font);
|
||||
|
@ -229,6 +208,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
sf::String EditBox::getText() const
|
||||
{
|
||||
return m_text;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setDefaultText(const sf::String& text)
|
||||
{
|
||||
m_defaultText.setString(text);
|
||||
|
@ -236,6 +222,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
sf::String EditBox::getDefaultText() const
|
||||
{
|
||||
return m_defaultText.getString();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
sf::String EditBox::getSelectedText() const
|
||||
{
|
||||
if (m_selStart < m_selEnd)
|
||||
|
@ -259,6 +252,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned int EditBox::getTextSize() const
|
||||
{
|
||||
return m_textFull.getCharacterSize();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setPasswordCharacter(char passwordChar)
|
||||
{
|
||||
// Change the password character
|
||||
|
@ -270,6 +270,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
char EditBox::getPasswordCharacter() const
|
||||
{
|
||||
return m_passwordChar;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setMaximumCharacters(unsigned int maxChars)
|
||||
{
|
||||
// Set the new character limit ( 0 to disable the limit )
|
||||
|
@ -295,6 +302,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned int EditBox::getMaximumCharacters() const
|
||||
{
|
||||
return m_maxChars;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setAlignment(Alignment alignment)
|
||||
{
|
||||
m_textAlignment = alignment;
|
||||
|
@ -303,6 +317,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EditBox::Alignment EditBox::getAlignment()
|
||||
{
|
||||
return m_textAlignment;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::limitTextWidth(bool limitWidth)
|
||||
{
|
||||
m_limitTextWidth = limitWidth;
|
||||
|
@ -334,6 +355,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool EditBox::isTextWidthLimited()
|
||||
{
|
||||
return m_limitTextWidth;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setCaretPosition(std::size_t charactersBeforeCaret)
|
||||
{
|
||||
// The caret position has to stay inside the string
|
||||
|
@ -373,7 +401,7 @@ namespace tgui
|
|||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
void EditBox::setCaretWidth(float width)
|
||||
{
|
||||
m_caret.setPosition(m_caret.getPosition().x + ((m_caret.getSize().x - width) / 2.0f), m_caret.getPosition().y);
|
||||
|
@ -382,6 +410,13 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float EditBox::getCaretWidth()
|
||||
{
|
||||
return m_caret.getSize().x;
|
||||
}
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::setInputValidator(const std::string& regex)
|
||||
{
|
||||
m_regexString = regex;
|
||||
|
@ -413,7 +448,7 @@ namespace tgui
|
|||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
void EditBox::setOpacity(float opacity)
|
||||
{
|
||||
ClickableWidget::setOpacity(opacity);
|
||||
|
@ -429,14 +464,7 @@ namespace tgui
|
|||
m_defaultText.setColor(calcColorOpacity(getRenderer()->m_defaultTextColor, getOpacity()));
|
||||
m_caret.setFillColor(calcColorOpacity(getRenderer()->m_caretColor, getOpacity()));
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
sf::Vector2f EditBox::getWidgetOffset() const
|
||||
{
|
||||
return {getRenderer()->getBorders().left, getRenderer()->getBorders().top};
|
||||
}
|
||||
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void EditBox::leftMousePressed(float x, float y)
|
||||
|
@ -886,7 +914,7 @@ namespace tgui
|
|||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
void EditBox::reload(const std::string& primary, const std::string& secondary, bool force)
|
||||
{
|
||||
m_textBeforeSelection.setColor({0, 0, 0});
|
||||
|
@ -920,12 +948,16 @@ namespace tgui
|
|||
setText(m_text);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
float EditBox::getVisibleEditBoxWidth()
|
||||
{
|
||||
return std::max(0.f, getSize().x - getRenderer()->getScaledPadding().left - getRenderer()->getScaledPadding().right);
|
||||
return std::max(0.f, getSize().x
|
||||
- getRenderer()->getBorders().left
|
||||
- getRenderer()->getBorders().right
|
||||
- getScaledPadding().left
|
||||
- getScaledPadding().right);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1067,11 +1099,11 @@ namespace tgui
|
|||
{
|
||||
Padding padding = getRenderer()->getScaledPadding();
|
||||
|
||||
float textX = getPosition().x + padding.left - m_textCropPosition;
|
||||
float textX = padding.left - m_textCropPosition;
|
||||
float textY = 0;
|
||||
if (getFont())
|
||||
{
|
||||
textY = std::round((getPosition().y + padding.top - getTextVerticalCorrection(getFont(), getTextSize()))
|
||||
textY = std::round((padding.top - getTextVerticalCorrection(getFont(), getTextSize()))
|
||||
+ ((getSize().y - padding.bottom - padding.top) - getFont()->getLineSpacing(getTextSize())) / 2.f);
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1142,7 @@ namespace tgui
|
|||
// Set the position and size of the rectangle that gets drawn behind the selected text
|
||||
m_selectedTextBackground.setSize({m_textSelection.findCharacterPos(m_textSelection.getString().getSize()).x - m_textSelection.getPosition().x,
|
||||
getSize().y - padding.top - padding.bottom});
|
||||
m_selectedTextBackground.setPosition(std::floor(textX + 0.5f), std::floor(getPosition().y + padding.top + 0.5f));
|
||||
m_selectedTextBackground.setPosition(std::floor(textX + 0.5f), std::floor(padding.top + 0.5f));
|
||||
|
||||
// Set the text selected text on the correct position
|
||||
m_textSelection.setPosition(std::floor(textX + 0.5f), textY);
|
||||
|
@ -1126,7 +1158,7 @@ namespace tgui
|
|||
|
||||
// Set the position of the caret
|
||||
caretLeft += m_textFull.findCharacterPos(m_selEnd).x - (m_caret.getSize().x * 0.5f);
|
||||
m_caret.setPosition(std::floor(caretLeft + 0.5f), std::floor(padding.top + getPosition().y + 0.5f));
|
||||
m_caret.setPosition(std::floor(caretLeft + 0.5f), std::floor(padding.top + 0.5f));
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1153,8 +1185,43 @@ namespace tgui
|
|||
|
||||
void EditBox::draw(sf::RenderTarget& target, sf::RenderStates states) const
|
||||
{
|
||||
states.transform.translate(getPosition());
|
||||
|
||||
// Draw the background
|
||||
getRenderer()->draw(target, states);
|
||||
if (m_textureNormal.isLoaded())
|
||||
{
|
||||
if (m_editBox->m_mouseHover && m_textureHover.isLoaded())
|
||||
target.draw(m_textureHover, states);
|
||||
else
|
||||
target.draw(m_textureNormal, states);
|
||||
|
||||
// When the edit box is focused then draw an extra image
|
||||
if (m_editBox->m_focused && m_textureFocused.isLoaded())
|
||||
target.draw(m_textureFocused, states);
|
||||
}
|
||||
else // There is no background texture
|
||||
{
|
||||
sf::RectangleShape editBox(m_editBox->getSize());
|
||||
editBox.setPosition(m_editBox->getPosition());
|
||||
|
||||
if (m_editBox->m_mouseHover)
|
||||
editBox.setFillColor(calcColorOpacity(m_backgroundColorHover, m_editBox->getOpacity()));
|
||||
else
|
||||
editBox.setFillColor(calcColorOpacity(m_backgroundColorNormal, m_editBox->getOpacity()));
|
||||
|
||||
target.draw(editBox, states);
|
||||
}
|
||||
|
||||
// Draw the borders
|
||||
Borders borders = getRenderer()->getBorders();
|
||||
if (borders != Borders{0, 0, 0, 0})
|
||||
{
|
||||
drawBorders(target, states, borders, getPosition(), getSize(), calcColorOpacity(getRenderer()->getBorderColor(), getRenderer()->getOpacity()));
|
||||
|
||||
// Don't try to draw the text when there is no space left for it
|
||||
if ((getSize().x <= borders.left + borders.right) || (getSize().y <= borders.top + borders.bottom))
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate the scale factor of the view
|
||||
const sf::View& view = target.getView();
|
||||
|
@ -1214,7 +1281,7 @@ namespace tgui
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
void EditBoxRenderer::setProperty(std::string property, const std::string& value)
|
||||
{
|
||||
property = toLower(property);
|
||||
|
@ -1620,7 +1687,7 @@ namespace tgui
|
|||
renderer->m_editBox = static_cast<EditBox*>(widget);
|
||||
return renderer;
|
||||
}
|
||||
|
||||
*/
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TGUI - Texus's Graphical User Interface
|
||||
// Copyright (C) 2012-2015 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
// Copyright (C) 2012-2016 Bruno Van de Velde (vdv_b@tgui.eu)
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied warranty.
|
||||
// In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue