Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CGUIString.h
Show All 9 Lines | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
* GNU General Public License for more details. | * GNU General Public License for more details. | ||||
* | * | ||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
/* | |||||
* GUI text, handles text stuff | |||||
* | |||||
* --Overview-- | |||||
* Mainly contains struct SGUIText and friends. | |||||
* Actual text processing is made in CGUI::GenerateText() | |||||
* | |||||
* --More info-- | |||||
* Check GUI.h | |||||
* | |||||
*/ | |||||
#ifndef INCLUDED_CGUISTRING | #ifndef INCLUDED_CGUISTRING | ||||
#define INCLUDED_CGUISTRING | #define INCLUDED_CGUISTRING | ||||
#include <list> | |||||
#include "gui/CGUISprite.h" | #include "gui/CGUISprite.h" | ||||
#include "gui/GUItext.h" | #include "gui/CGUIText.h" | ||||
#include "ps/CStrIntern.h" | #include "ps/CStrIntern.h" | ||||
#include <list> | |||||
vladislavbelov: Why `<list>` is included, but `<array>` not? The same below. | |||||
elexisAuthorUnsubmitted Done Inline Actions
:P elexis: > (01:25:37 AM) elexis: I need to update the diff
> (01:25:49 AM) elexis: as the uploaded one… | |||||
class CGUI; | class CGUI; | ||||
/** | /** | ||||
* String class, substitute for CStr, but that parses | * String class, substitute for CStr, but that parses | ||||
* the tags and builds up a list of all text that will | * the tags and builds up a list of all text that will | ||||
* be different when outputted. | * be different when outputted. | ||||
* | * | ||||
* The difference between CGUIString and SGUIText is that | * The difference between CGUIString and CGUIText is that | ||||
* CGUIString is a string-class that parses the tags | * CGUIString is a string-class that parses the tags | ||||
* when the value is set. The SGUIText is just a container | * when the value is set. The CGUIText is just a container | ||||
* which stores the positions and settings of all text-calls | * which stores the positions and settings of all text-calls | ||||
* that will have to be made to the Renderer. | * that will have to be made to the Renderer. | ||||
*/ | */ | ||||
class CGUIString | class CGUIString | ||||
{ | { | ||||
public: | public: | ||||
/** | /** | ||||
* A chunk of text that represents one call to the renderer. | * A chunk of text that represents one call to the renderer. | ||||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | struct SFeedback | ||||
/** | /** | ||||
* Reset all member data. | * Reset all member data. | ||||
*/ | */ | ||||
void Reset(); | void Reset(); | ||||
/** | /** | ||||
* Image stacks, for left and right floating images. | * Image stacks, for left and right floating images. | ||||
*/ | */ | ||||
std::vector<CStr> m_Images[2]; // left and right | std::array<std::vector<CStr>, 2> m_Images; // left and right | ||||
/** | /** | ||||
* Text and Sprite Calls. | * Text and Sprite Calls. | ||||
*/ | */ | ||||
std::vector<SGUIText::STextCall> m_TextCalls; | std::vector<CGUIText::STextCall> m_TextCalls; | ||||
std::list<SGUIText::SSpriteCall> m_SpriteCalls; // list for consistent mem addresses | |||||
// so that we can point to elements. | // list for consistent mem addresses so that we can point to elements. | ||||
std::list<CGUIText::SSpriteCall> m_SpriteCalls; | |||||
/** | /** | ||||
* Width and Height *feedback* | * Width and Height *feedback* | ||||
*/ | */ | ||||
CSize m_Size; | CSize m_Size; | ||||
/** | /** | ||||
* If the word inputted was a new line. | * If the word inputted was a new line. | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Why <list> is included, but <array> not? The same below.