aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/texture_region_editor_plugin.cpp
diff options
context:
space:
mode:
authorPedro J. Estébanez2018-03-24 03:05:20 +0100
committerPedro J. Estébanez2018-03-27 19:19:45 +0200
commita6dc160d5cdf581c61d9c0ecd042aa7b5e958a87 (patch)
tree0b5c5764d8d979b38393c54ca5f370ebd972ebec /editor/plugins/texture_region_editor_plugin.cpp
parentbf14a6deffe4c9b74920080851f7e4e273f66116 (diff)
downloadgodot-a6dc160d5cdf581c61d9c0ecd042aa7b5e958a87.tar.gz
godot-a6dc160d5cdf581c61d9c0ecd042aa7b5e958a87.tar.zst
godot-a6dc160d5cdf581c61d9c0ecd042aa7b5e958a87.zip
Use radio-button-like menu entries where applicable
Diffstat (limited to 'editor/plugins/texture_region_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 4367fe897..5ba393168 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -805,12 +805,10 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
snap_mode_button->set_text(TTR("<None>"));
PopupMenu *p = snap_mode_button->get_popup();
p->set_hide_on_checkable_item_selection(false);
- p->add_item(TTR("<None>"), 0);
- p->add_item(TTR("Pixel Snap"), 1);
- p->add_item(TTR("Grid Snap"), 2);
- p->add_item(TTR("Auto Slice"), 3);
- for (int i = 0; i < 4; i++)
- p->set_item_as_checkable(i, true);
+ p->add_radio_check_item(TTR("<None>"), 0);
+ p->add_radio_check_item(TTR("Pixel Snap"), 1);
+ p->add_radio_check_item(TTR("Grid Snap"), 2);
+ p->add_radio_check_item(TTR("Auto Slice"), 3);
p->set_item_checked(0, true);
p->connect("id_pressed", this, "_set_snap_mode");
hb_grid = memnew(HBoxContainer);