update gradle project, parallel for-loop based on std::thread on android, fix mipmaps on TextureManager

This commit is contained in:
2019-01-28 14:06:42 +01:00
parent 53fd2d60b5
commit a85918c8b0
8 changed files with 74 additions and 11 deletions

View File

@@ -82,6 +82,7 @@ void NodePanelStroke::init_controls()
Canvas::I->m_current_brush = b;
m_preset_thumb = find<NodeImage>("preset-thumb");
m_preset_thumb->m_use_mipmaps = true;
m_preset_preview = find<NodeStrokePreview>("preset-preview");
m_preset_preview->m_brush = b;
m_preset_preview->draw_stroke();
@@ -118,12 +119,17 @@ void NodePanelStroke::init_controls()
m_brush_button = find<NodeButtonCustom>("tip-change");
m_brush_button->on_click = [this](Node*) {
auto screen = root()->m_size;
glm::vec2 pos = m_brush_button->m_pos + glm::vec2(m_brush_button->m_size.x, 0);
root()->add_child(m_brush_popup);
root()->update();
if ((pos.y + m_brush_popup->m_size.y) > screen.y) pos.y = screen.y - m_brush_popup->m_size.y;
if (pos.y < 0) pos.y = 0;
m_brush_popup->SetPosition(pos.x, pos.y);
m_brush_popup->mouse_capture();
root()->update();
m_brush_popup->on_brush_changed = [this](Node*, int index) {
if (on_brush_changed)
on_brush_changed(this, m_brush_popup->get_texture_path(index), m_brush_popup->get_thumb_path(index));