Commit e93f65ad authored by vgmoose's avatar vgmoose 🌱
Browse files

changes for chesto v1.0rc branch

parent 424913b4
Pipeline #148536824 failed with stage
in 4 minutes and 44 seconds
......@@ -216,7 +216,7 @@ void AboutScreen::render(Element* parent)
CST_FillRect(parent->renderer, &dimens);
this->renderer = parent->renderer;
super::render(this);
super::render(parent);
}
bool AboutScreen::process(InputEvents* event)
......
......@@ -57,19 +57,19 @@ void AppCard::update()
// update the position of the elements
icon.position(this->x, this->y);
version.position(this->x + 40, this->y + icon.height + 10);
status.position(this->x + 40, this->y + icon.height + 25);
icon.position(0, 0);
version.position(40, icon.height + 10);
status.position(40, icon.height + 25);
int spacer = this->width - 11; // 245 on 720p
appname.getTextureSize(&w, &h);
appname.position(this->x + spacer - w, this->y + icon.height + 5);
appname.position(spacer - w, icon.height + 5);
author.getTextureSize(&w, &h);
author.position(this->x + spacer - w, this->y + icon.height + 25);
author.position(spacer - w, icon.height + 25);
statusicon.position(this->x + 4, this->y + icon.height + 10);
statusicon.position(4, icon.height + 10);
}
// Trigger the icon download (if the icon wasn't already cached)
......@@ -81,7 +81,7 @@ void AppCard::handleIconLoad()
int twoCardsHeight = (this->height + 15) * 2;
if ((list->y + this->y + this->height) < -twoCardsHeight)
if ((list->y + this->height) < -twoCardsHeight)
return;
if ((list->y + this->y) > (SCREEN_HEIGHT + twoCardsHeight))
return;
......
......@@ -362,7 +362,7 @@ void AppDetails::render(Element* parent)
// draw white background
CST_Rect dimens = { 0, 0, 920, PANE_WIDTH };
CST_Color white = { 0xff, 0xff, 0xff, 0xff };
CST_Color white = { 0xff, 0xff, 0xff, 0xff };
CST_SetDrawColor(parent->renderer, white);
CST_FillRect(parent->renderer, &dimens);
......@@ -370,7 +370,7 @@ void AppDetails::render(Element* parent)
CST_SetDrawColor(parent->renderer, white);
// draw all elements
super::render(this);
super::render(parent);
}
int AppDetails::updatePopupStatus(int status, int num, int num_total)
......@@ -495,7 +495,7 @@ void AppDetailsContent::render(Element* parent)
this->renderer = parent->renderer;
super::render(this);
ListElement::render(parent);
}
bool AppDetailsContent::process(InputEvents* event)
......
......@@ -93,7 +93,7 @@ bool AppList::process(InputEvents* event)
// must be done before keyboard stuff to properly switch modes
if (event->isTouchDown())
{
// remove a highilight if it exists (TODO: same as an above if statement)
// remove a highlight if it exists (TODO: same as an above if statement)
if (this->highlighted >= 0 && this->highlighted < this->elements.size() && this->elements[this->highlighted])
this->elements[this->highlighted]->elasticCounter = NO_HIGHLIGHT;
......@@ -242,7 +242,7 @@ void AppList::render(Element* parent)
this->renderer = parent->renderer;
}
super::render(this);
super::render(parent);
}
bool AppList::sortCompare(const Package* left, const Package* right)
......
......@@ -58,6 +58,20 @@ Feedback::Feedback(Package* package)
#endif
}
void Feedback::render(Element* parent)
{
// draw a white background, 870 wiz
CST_Color white = { 0xff, 0xff, 0xff, 0xff };
if (parent != NULL) {
CST_SetDrawColor(parent->renderer, white);
this->renderer = parent->renderer;
}
return super::render(parent);
}
bool Feedback::process(InputEvents* event)
{
bool ret = super::process(event);
......
......@@ -14,6 +14,7 @@ class Feedback : public Element
public:
Feedback(Package* package);
void render(Element* parent);
bool process(InputEvents* event);
bool needsRefresh = false;
......
......@@ -8,6 +8,8 @@ Keyboard::Keyboard(AppList* appList)
this->x = 372;
this->y = 417;
this->isAbsolute = true;
// set touchmode based on applist if it's present
if (appList)
touchMode = appList->touchMode;
......@@ -89,7 +91,7 @@ void Keyboard::render(Element* parent)
// CST_SetDrawColor(parent->renderer, 0xff, 0xaa, 0xaa, 0xff);
// CST_FillRect(parent->renderer, &dimens4);
super::render(this);
super::render(parent);
}
bool Keyboard::process(InputEvents* event)
......@@ -257,7 +259,7 @@ void Keyboard::updateSize()
// go through and draw each of the three rows at the right position
for (int x = 0; x < rowsCount; x++)
{
TextElement* rowText = new TextElement(rows[x].c_str(), textSize, &gray, true);
Element* rowText = new TextElement(rows[x].c_str(), textSize, &gray, true);
rowText->position(kXPad + x * kXOff, kYPad + x * kYOff - (rowText->height / 2));
super::append(rowText);
}
......@@ -269,11 +271,11 @@ void Keyboard::updateSize()
int textSize2 = (int)((16 / 400.0) * width);
TextElement* delButton = new TextElement("DEL", textSize2, &gray, false);
Element* delButton = new TextElement("DEL", textSize2, &gray, false);
delButton->position(dPos2, dHeight2);
super::append(delButton);
TextElement* spaceButton = new TextElement("SPACE", textSize2, &gray, false);
Element* spaceButton = new TextElement("SPACE", textSize2, &gray, false);
spaceButton->position(sPos2, dHeight2);
super::append(spaceButton);
}
......
......@@ -35,6 +35,8 @@ void MainDisplay::render(Element* parent)
{
if (showingSplash)
renderedSplash = true;
renderBackground(true);
RootDisplay::render(parent);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment