Skip to content
Snippets Groups Projects
Commit f1a9a9e3 authored by Odilitime's avatar Odilitime
Browse files

change boundToPage/useBoxShader resize usage

parent 94762ad3
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,7 @@ void InputComponent::resize(const int passedWindowWidth, const int passedWindowH
windowWidth = passedWindowWidth;
windowHeight = passedWindowHeight;
/*
if (!boundToPage) {
// ok because box shader is anchored to the bottom of the screen
// if we resize Y (increase height), we need to rebind
......@@ -153,15 +154,18 @@ void InputComponent::resize(const int passedWindowWidth, const int passedWindowH
this->y += yDiff;
lastRenderedWindowHeight = windowHeight;
}
*/
// turning this off breaks coordinates
//boundToPage = true;
/*
useBoxShader = true;
for (int i = 0; i < 3; i++) {
data[0][0][i] = 0xf0; // set RGB color
}
data[0][0][3] = 0xff; // set alpha
*/
//std::cout << "InputComponent::resize - placing box at " << (int)x << "," << (int)y << " size: " << (int)width << "x" << (int)height << std::endl;
......@@ -184,7 +188,6 @@ void InputComponent::resize(const int passedWindowWidth, const int passedWindowH
vy1 = y - height;
boundToPage = false;
*/
pointToViewport(vx, vy);
//pointToViewport(vx1, vy1);
......@@ -273,6 +276,7 @@ void InputComponent::updateText() {
std::cout << "InputComponent::updateText - couldn't estimate value[" << value << "] size" << std::endl;
return;
}
//int textWidth = textInfo->first;
int estWidth = std::get<0>(*textInfo.get());
//int estHeight = std::get<1>(*textInfo.get());
userInputText->rasterStartX = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment