2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

General: Include headers where applicable

Ensures necessary dependencies are always included where applicable, as
well as avoiding including dependencies where they aren't necessary.
This commit is contained in:
Lioncash
2019-08-30 05:55:46 -04:00
parent 50a7f7a860
commit 21dece5b1e
41 changed files with 726 additions and 359 deletions

View File

@@ -1,5 +1,7 @@
#include "specter/TextField.hpp"
#include "specter/RootView.hpp"
#include "specter/TextView.hpp"
#include "specter/ViewResources.hpp"
namespace specter {
@@ -22,6 +24,8 @@ TextField::TextField(ViewResources& res, View& parentView, IStringBinding* strBi
setText(strBind->getDefault(this));
}
TextField::~TextField() = default;
void TextField::_setText() {
if (m_hasTextSet) {
_clearSelectionRange();
@@ -721,6 +725,21 @@ void TextField::clearSelectionRange() {
m_hasSelectionSet = false;
}
void TextField::setMultiplyColor(const zeus::CColor& color) {
View::setMultiplyColor(color);
m_viewVertBlock.m_color = color;
if (m_viewVertBlockBuf) {
m_viewVertBlockBuf.access().finalAssign(m_viewVertBlock);
}
m_text->setMultiplyColor(color);
if (m_errText) {
m_errText->setMultiplyColor(color);
}
}
void TextField::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) {
float pf = rootView().viewRes().pixelFactor();
int width = sub.size[0];