implemented brush settings switch between pen/erase
This commit is contained in:
@@ -81,3 +81,18 @@ uint16_t NodePanelBrush::get_texture_id(int index) const
|
||||
{
|
||||
return m_brushes[index]->img->m_tex_id;
|
||||
}
|
||||
|
||||
// select the current brush based on the texture id
|
||||
void NodePanelBrush::set_texture_id(int texid)
|
||||
{
|
||||
if (m_current)
|
||||
m_current->m_selected = false;
|
||||
for (auto b : m_brushes)
|
||||
{
|
||||
if (b->img->m_tex_id == texid)
|
||||
{
|
||||
b->m_selected = true;
|
||||
m_current = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user