diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index 8ebb8c1..4bb7d13 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -61,10 +61,12 @@ add_library( ../engine/node_canvas.cpp ../engine/node_checkbox.cpp ../engine/node_color_quad.cpp + ../engine/node_colorwheel.cpp ../engine/node_combobox.cpp ../engine/node_dialog_browse.cpp ../engine/node_dialog_cloud.cpp ../engine/node_dialog_open.cpp + ../engine/node_dialog_picker.cpp ../engine/node_dialog_layer_rename.cpp ../engine/node_icon.cpp ../engine/node_image.cpp diff --git a/engine/app_layout.cpp b/engine/app_layout.cpp index 2803126..ec81597 100644 --- a/engine/app_layout.cpp +++ b/engine/app_layout.cpp @@ -4,6 +4,7 @@ #include "node_dialog_open.h" #include "node_text.h" #include "node_progress_bar.h" +#include "node_dialog_picker.h" using namespace ui; @@ -219,9 +220,11 @@ void App::init_sidebar() if (auto* button = layout[main_id]->find("btn-color")) { button->on_click = [this, button](Node*) { - panels->get_child_index(color.get()) == -1 ? panels->add_child(color) : panels->remove_child(color.get()); - panels->fix_scroll(); - button->set_color(panels->get_child_index(color.get()) == -1 ? color_button_normal : color_button_hlight); +// panels->get_child_index(color.get()) == -1 ? panels->add_child(color) : panels->remove_child(color.get()); +// panels->fix_scroll(); +// button->set_color(panels->get_child_index(color.get()) == -1 ? color_button_normal : color_button_hlight); + auto pick = layout[main_id]->add_child(); + pick->m_color_cur->m_color = ui::Canvas::I->m_current_brush.m_tip_color; }; } if (auto* button = layout[main_id]->find("btn-layer")) diff --git a/engine/canvas.cpp b/engine/canvas.cpp index 86c05f0..649c690 100644 --- a/engine/canvas.cpp +++ b/engine/canvas.cpp @@ -907,7 +907,7 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path) m_tmp[i].clear({ 1, 1, 1, 1 }); glActiveTexture(GL_TEXTURE0); // TODO: maybe remove this line - m_sampler.bind(0); + m_sampler_mask.bind(0); for (auto layer_index : m_order) { ShaderManager::u_float(kShaderUniform::Alpha, m_layers[layer_index].m_opacity); @@ -915,7 +915,7 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path) m_plane.draw_fill(); m_layers[layer_index].m_rtt[i].unbindTexture(); } - m_sampler.unbind(); + m_sampler_mask.unbind(); // copy result to cubemap glBindTexture(GL_TEXTURE_CUBE_MAP, cube_id); @@ -955,9 +955,9 @@ void ui::Canvas::export_equirectangular_thread(std::string file_path) ui::ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-.5f, .5f, -.5f, .5f, -1.f, 1.f)); ui::ShaderManager::u_int(kShaderUniform::Tex, 0); glBindTexture(GL_TEXTURE_CUBE_MAP, cube_id); - m_sampler.bind(0); + m_sampler_mask.bind(0); m_plane.draw_fill(); - m_sampler.unbind(); + m_sampler_mask.unbind(); glBindTexture(GL_TEXTURE_CUBE_MAP, 0); m_latlong.unbindFramebuffer(); { diff --git a/engine/node_panel_color.cpp b/engine/node_panel_color.cpp index 88f950d..e958182 100644 --- a/engine/node_panel_color.cpp +++ b/engine/node_panel_color.cpp @@ -50,6 +50,7 @@ void NodePanelColor::set_color(glm::vec3 rgb) m_quad->m_value = glm::vec2(hsv.y, 1.f - hsv.z); m_quad->m_color = glm::vec4(rgb, 1); m_cursor = m_quad->m_value; + m_base_color = glm::vec4(rgb, 1); } void NodePanelColor::added(Node* parent)