frame select layer
This commit is contained in:
@@ -54,7 +54,7 @@ kEventResult NodeButtonCustom::handle_event(Event* e)
|
||||
switch (e->m_type)
|
||||
{
|
||||
case kEventType::MouseEnter:
|
||||
m_color = color_hover;
|
||||
m_color = m_active ? color_active : color_hover;
|
||||
break;
|
||||
case kEventType::MouseLeave:
|
||||
m_color = m_active ? color_active : color_normal;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "node_button.h"
|
||||
#include "node_button_custom.h"
|
||||
#include "canvas.h"
|
||||
#include "app.h"
|
||||
|
||||
Node* NodePanelAnimation::clone_instantiate() const
|
||||
{
|
||||
@@ -78,7 +79,7 @@ void NodePanelAnimation::load_layers()
|
||||
b->set_active(true);
|
||||
m_selected_frame = b.get();
|
||||
}
|
||||
b->on_click = [this, fi, lid=layers[i]->id] (Node* target) {
|
||||
b->on_click = [this, fi, lid=layers[i]->id, i] (Node* target) {
|
||||
auto frame = static_cast<NodeAnimationFrame*>(target);
|
||||
if (m_selected_frame)
|
||||
m_selected_frame->set_active(false);
|
||||
@@ -86,6 +87,7 @@ void NodePanelAnimation::load_layers()
|
||||
m_selected_frame = frame;
|
||||
m_selected_frame_layer_id = lid;
|
||||
m_selected_frame_index = fi;
|
||||
App::I->layers->handle_layer_selected(App::I->layers->get_layer_at(i));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,10 @@ RTT::RTT(RTT&& other)
|
||||
|
||||
RTT::~RTT()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if (valid())
|
||||
LOG("RTT not destroyed");
|
||||
#endif // _DEBUG
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user