Skip to content

Commit 5d211ca

Browse files
committed
rename option
1 parent 6db55a4 commit 5d211ca

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/DevTools.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct matjson::Serialize<Settings> {
3535
assign(value["button_y"], s.buttonPos.y);
3636
assign(value["button_editor"], s.buttonInEditor);
3737
assign(value["button_game"], s.buttonInGame);
38-
assign(value["enable_moving"], s.enableMoving);
38+
assign(value["tree_drag_reorder"], s.treeDragReorder);
3939

4040
return Ok(s);
4141
}
@@ -57,7 +57,7 @@ struct matjson::Serialize<Settings> {
5757
{ "button_y", settings.buttonPos.y },
5858
{ "button_editor", settings.buttonInEditor },
5959
{ "button_game", settings.buttonInGame },
60-
{ "enable_moving", settings.enableMoving }
60+
{ "tree_drag_reorder", settings.treeDragReorder }
6161
});
6262
}
6363
};

src/DevTools.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct Settings {
3232
CCPoint buttonPos = {50, 50};
3333
bool buttonInEditor = false;
3434
bool buttonInGame = false;
35-
bool enableMoving = false;
35+
bool treeDragReorder = false;
3636
};
3737

3838
class DevTools {

src/pages/Settings.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ void DevTools::drawSettings() {
5858
"As a side effect to disabling this, things may render incorrectly."
5959
);
6060
}
61-
ImGui::Checkbox("Enable Node Moving", &m_settings.enableMoving);
61+
ImGui::Checkbox("Node Tree Reordering", &m_settings.treeDragReorder);
6262
if (ImGui::IsItemHovered()) {
6363
ImGui::SetTooltip(
64-
"Adds a button to allow moving a node to a different parent via drag/drop"
64+
"(Experimental)\nAllows you to drag/drop nodes in the node tree, changing\ntheir parents or ordering."
6565
);
6666
}
6767
ImGui::Checkbox("Advanced Settings", &m_settings.advancedSettings);
@@ -87,7 +87,7 @@ void DevTools::drawSettings() {
8787
ImGui::Separator();
8888

8989
ImGui::DragFloat("Font Size", &ImGui::GetIO().FontGlobalScale, 0.01f, 1.0f, 3.0f);
90-
90+
9191
#ifdef GEODE_IS_DESKTOP
9292

9393
ImGui::Separator();

src/pages/Tree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void DevTools::drawTreeBranch(CCNode* node, size_t index, bool drag) {
137137

138138
bool isDrag = false;
139139

140-
if (m_settings.enableMoving && ImGui::IsItemActive()) {
140+
if (m_settings.treeDragReorder && ImGui::IsItemActive()) {
141141
if (ImGui::IsMouseDragging(ImGuiMouseButton_Left, height / 2.f)) {
142142
isDrag = true;
143143
if (this->getDraggedNode() != node) {

0 commit comments

Comments
 (0)