Working on getting GUI functional again
This commit is contained in:
parent
f3fde56dcf
commit
16c3097534
49 changed files with 178 additions and 104 deletions
|
|
@ -13,12 +13,11 @@ namespace GUIStuff {
|
|||
|
||||
void Element::clay_draw(SkCanvas* canvas, UpdateInputData& io, Clay_RenderCommand* command, bool skiaAA) {}
|
||||
|
||||
void Element::update_bounding_box(Clay_RenderCommand* command) {
|
||||
boundingBox = get_bb_from_command(command);
|
||||
}
|
||||
|
||||
void Element::clear_bounding_box() {
|
||||
boundingBox = std::nullopt;
|
||||
void Element::set_bounding_box_from_elem_data(const Clay_ElementData& elemData) {
|
||||
if(elemData.found)
|
||||
boundingBox = {{elemData.boundingBox.x, elemData.boundingBox.y}, {elemData.boundingBox.x + elemData.boundingBox.width, elemData.boundingBox.y + elemData.boundingBox.height}};
|
||||
else
|
||||
boundingBox = std::nullopt;
|
||||
}
|
||||
|
||||
const std::optional<SCollision::AABB<float>>& Element::get_bb() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue