-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move common selection actions into 'edit' panel
I think it is a bit better like that, separating the selection tool from the actions we perform on the selection.
- Loading branch information
1 parent
da706e5
commit 7080566
Showing
9 changed files
with
1,520 additions
and
1,485 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* Goxel 3D voxels editor | ||
* | ||
* copyright (c) 2024-present Guillaume Chereau <[email protected]> | ||
* | ||
* Goxel is free software: you can redistribute it and/or modify it under the | ||
* terms of the GNU General Public License as published by the Free Software | ||
* Foundation, either version 3 of the License, or (at your option) any later | ||
* version. | ||
* Goxel is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
* details. | ||
* You should have received a copy of the GNU General Public License along with | ||
* goxel. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "goxel.h" | ||
|
||
void gui_edit_panel(void) | ||
{ | ||
image_t *img = goxel.image; | ||
|
||
gui_group_begin(NULL); | ||
gui_enabled_begin(!box_is_null(img->selection_box)); | ||
gui_action_button(ACTION_fill_selection_box, _(FILL), 1.0); | ||
gui_group_end(); | ||
gui_enabled_end(); | ||
|
||
gui_group_begin(NULL); | ||
gui_enabled_begin(!volume_is_empty(goxel.image->selection_mask)); | ||
gui_action_button(ACTION_layer_clear, _(CLEAR), 1.0); | ||
gui_action_button(ACTION_paint_selection, _(PAINT), 1.0); | ||
gui_action_button(ACTION_cut_as_new_layer, "Cut as new layer", 1.0); | ||
gui_enabled_end(); | ||
gui_group_end(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.