adding some buttons to UI
This commit is contained in:
@@ -353,11 +353,15 @@
|
|||||||
<button id="btn-open" width="50" height="100%" margin="0 5 0 0" text="Open"/>
|
<button id="btn-open" width="50" height="100%" margin="0 5 0 0" text="Open"/>
|
||||||
<button id="btn-save" width="50" height="100%" margin="0 5 0 0" text="Save"/>
|
<button id="btn-save" width="50" height="100%" margin="0 5 0 0" text="Save"/>
|
||||||
<button id="btn-export" width="50" height="100%" margin="0 5 0 0" text="Export"/>
|
<button id="btn-export" width="50" height="100%" margin="0 5 0 0" text="Export"/>
|
||||||
<button id="btn-undo" width="50" height="100%" margin="0 5 0 0" text="Undo"/>
|
<button id="btn-clear" width="50" height="100%" margin="0 5 0 15" text="Clear"/>
|
||||||
<button id="btn-close" width="50" height="100%" margin="0 5 0 0" text="Clear"/>
|
<button-custom id="btn-bucket" width="50" height="100%" margin="0 20 0 0" thickness="1" border-color="0 0 0 1" pad="2">
|
||||||
<button-custom id="btn-bucket" width="50" height="100%" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="2">
|
|
||||||
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
<button id="btn-undo" width="50" height="100%" margin="0 5 0 0" text="Undo"/>
|
||||||
|
<button id="btn-pen" width="50" height="100%" margin="0 0 0 0" text="Pen"/>
|
||||||
|
<button id="btn-line" width="50" height="100%" margin="0 0 0 0" text="Line"/>
|
||||||
|
<button id="btn-erase" width="60" height="100%" margin="0 0 0 0" text="Erase"/>
|
||||||
|
<button id="btn-cam" width="70" height="100%" margin="0 0 0 0" text="Camera"/>
|
||||||
<!--
|
<!--
|
||||||
<button-custom id="btn-layer" width="50" height="100%" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="6" align="center" justify="center">
|
<button-custom id="btn-layer" width="50" height="100%" margin="0 5 0 0" thickness="1" border-color="0 0 0 1" pad="6" align="center" justify="center">
|
||||||
<icon width="100%" height="100%" icon="disk"/>
|
<icon width="100%" height="100%" icon="disk"/>
|
||||||
|
|||||||
@@ -460,6 +460,11 @@ void App::initLayout()
|
|||||||
canvas->m_canvas->m_layers[canvas->m_canvas->m_order[idx]].m_alpha_locked = visible;
|
canvas->m_canvas->m_layers[canvas->m_canvas->m_order[idx]].m_alpha_locked = visible;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (auto* button = layout[main_id]->find<NodeButton>("btn-pen"))
|
||||||
|
{
|
||||||
|
button->on_click = [this](Node*) {
|
||||||
|
};
|
||||||
|
}
|
||||||
if (auto* button = layout[main_id]->find<NodeButtonCustom>("btn-bucket"))
|
if (auto* button = layout[main_id]->find<NodeButtonCustom>("btn-bucket"))
|
||||||
{
|
{
|
||||||
button->on_click = [this](Node*) {
|
button->on_click = [this](Node*) {
|
||||||
@@ -541,7 +546,7 @@ void App::initLayout()
|
|||||||
ActionManager::undo();
|
ActionManager::undo();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (auto* button = layout[main_id]->find<NodeButton>("btn-close"))
|
if (auto* button = layout[main_id]->find<NodeButton>("btn-clear"))
|
||||||
{
|
{
|
||||||
button->on_click = [this](Node*) {
|
button->on_click = [this](Node*) {
|
||||||
//exit(0);
|
//exit(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user