What could I add next? #include "gui.hpp" #include "../render/screen.hpp" #include…
- User
What could I add next?
#include "gui.hpp" #include "../render/screen.hpp" #include "basic_components.hpp" #include "component.hpp" #include
int whim::gui::GUI::getHeight(){ return this->charHeight; } int whim::gui::GUI::getWidth(){ return this->charWidth; } int whim::gui::GUI::getRealHeight(){ return this->pixelHeight; } int whim::gui::GUI::getRealWidth(){ return this->pixelWidth; }
void whim::gui::GUI::update(){
} void whim::gui::GUI::redraw(){ this->screen->reset(); for(Component* comp : this->renderChain){ comp->render(); } this->screen->redraw();
} void whim::gui::GUI::addComponent(whim::gui::Component* comp){ comp->id = this->nextID; comp->screen = this->screen; this->components.push_back(comp); this->componentsById[comp->id] = comp; if(comp->name != ""){ this->componentsByName[comp->name] = comp; } this->updateRenderchain(); } whim::gui::GUI::GUI(){ this->screen = new rendering::Screen{}; this->charHeight = this->screen->getHeight(); this->charWidth = this->screen->getWidth(); this->pixelHeight = this->screen->getRealHeight(); this->pixelWidth = this->screen->getRealWidth(); this->nextID = 0;
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.