ronantakizawa/codereview-bench huggingface dataset:
Repository: godotengine/godot
File: editor/plugins/sprite_2d_editor_plugin.h (C/C++)

Code before:
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#pragma once

#include "editor/plugins/editor_plugin.h"
#include "scene/2d/sprite_2d.h"
#include "scene/gui/spin_box.h"

class AcceptDialog;
class Button;
class ConfirmationDialog;
class EditorZoomWidget;
class MenuButton;
class Panel;
class ViewPanner;

class Sprite2DEditor : public Control {
	GDCLASS(Sprite2DEditor, Control);

	enum Menu {
		MENU_OPTION_CONVERT_TO_MESH_2D,
		MENU_OPTION_CONVERT_TO_POLYGON_2D,
		MENU_OPTION_CREATE_COLLISION_POLY_2D,
		MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D,
	};

	Menu selected_menu_item;

	Sprite2D *node = nullptr;

	MenuButton *options = nullptr;
	Button *resize_region_rect = nullptr;

	ConfirmationDialog *outline_dialog = nullptr;

	AcceptDialog *err_dialog = nullptr;

	ConfirmationDialog *debug_uv_dialog = nullptr;
	Panel *debug_uv = nullptr;
	Vector<Vector2> uv_lines;
	Vector<Vector<Vector2>> outline_lines;
	Vector<Vector<Vector2>> computed_outline_lines;
	Vector<Vector2> computed_vertices;
	Vector<Vector2> computed_uv;
	Vector<int> computed_indices;

	HScrollBar *h_scroll = nullptr;
	VScrollBar *v_scroll = nullptr;
	EditorZoomWidget *zoom_widget = nullptr;

Review comment (suggestion):
Unless you are adding something to the enum, this change is useless.
EDIT:
I think it's a leftover.

Code after:
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#pragma once

#include "editor/plugins/editor_plugin.h"
#include "scene/2d/sprite_2d.h"
#include "scene/gui/spin_box.h"

class AcceptDialog;
class Button;
class ConfirmationDialog;
class EditorZoomWidget;
class HBoxContainer;
class MenuButton;
class Panel;
class ViewPanner;

class Sprite2DEditor : public Control {
	GDCLASS(Sprite2DEditor, Control);

	enum Menu {
		MENU_OPTION_CONVERT_TO_MESH_2D,
		MENU_OPTION_CONVERT_TO_POLYGON_2D,
		MENU_OPTION_CREATE_COLLISION_POLY_2D,
		MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D
	};

	HBoxContainer *top_hb = nullptr;

	Menu selected_menu_item;

	Sprite2D *node = nullptr;

	MenuButton *options = nullptr;
	Button *resize_region_rect = nullptr;

	ConfirmationDialog *outline_dialog = nullptr;

	AcceptDialog *err_dialog = nullptr;

	ConfirmationDialog *debug_uv_dialog = nullptr;
	Panel *debug_uv = nullptr;
	Vector<Vector2> uv_lines;
	Vector<Vector<Vector2>> outline_lines;
	Vector<Vector<Vector2>> computed_outline_lines;
	Vector<Vector2> computed_vertices;
	Vector<Vector2> computed_uv;
	Vector<int> computed_indices;
Repository: godotengine/godot
File: platform/windows/display_server_windows.cpp (C++)

Code before:
	info.dwFlags = FLASHW_ALL;
	info.dwTimeout = 0;
	info.uCount = 2;
	FlashWindowEx(&info);
}

void DisplayServerWindows::window_set_taskbar_progress_value(int p_value, int p_total, WindowID p_window) {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND(!windows.has(p_window));
	const WindowData &wd = windows[p_window];

	CoInitialize(0);
	CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbar);
	pTaskbar->HrInit();

	pTaskbar->SetProgressValue(wd.hWnd, (ULONGLONG)p_value, (ULONGLONG)p_total);
}

void DisplayServerWindows::window_set_taskbar_progress_state(ProgressState p_state, WindowID p_window) {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND(!windows.has(p_window));
	const WindowData &wd = windows[p_window];

	CoInitialize(0);
	CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&pTaskbar);
	pTaskbar->HrInit();

	TBPFLAG tbpf = TBPF_NOPROGRESS;
	switch (p_state) {
		case PROGRESS_STATE_NOPROGRESS:
			tbpf = TBPF_NOPROGRESS;
			break;
		case PROGRESS_STATE_INDETERMINATE:
			tbpf = TBPF_INDETERMINATE;
			break;
		case PROGRESS_STATE_ERROR:
			tbpf = TBPF_ERROR;
			break;
		case PROGRESS_STATE_PAUSED:
			tbpf = TBPF_PAUSED;
			break;
		case PROGRESS_STATE_NORMAL:
			tbpf = TBPF_NORMAL;
			break;
		default:
			break;
	}

	pTaskbar->SetProgressState(wd.hWnd, tbpf);

Review comment (bug):
`os_windows.cpp` already calls `CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);` so I don't think you need to call `CoInitialize(0)` here.
Same above.

Code after:
		case WINDOW_FLAG_MOUSE_PASSTHROUGH: {
			wd.mpass = p_enabled;
		} break;
		case WINDOW_FLAG_EXCLUDE_FROM_CAPTURE: {
			wd.hide_from_capture = p_enabled;
			if (p_enabled) {
				if (os_ver.dwBuildNumber >= 19041) {
					SetWindowDisplayAffinity(wd.hWnd, WDA_EXCLUDEFROMCAPTURE);
				} else {
					SetWindowDisplayAffinity(wd.hWnd, WDA_MONITOR);
				}
			} else {
				SetWindowDisplayAffinity(wd.hWnd, WDA_NONE);
			}
		} break;
		case WINDOW_FLAG_POPUP: {
			ERR_FAIL_COND_MSG(p_window == MAIN_WINDOW_ID, "Main window can't be popup.");
			ERR_FAIL_COND_MSG(IsWindowVisible(wd.hWnd) && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened.");
			if (p_enabled && wd.parent_hwnd) {
				print_line("Embedded window can't be popup.");
				return;
			}
			wd.is_popup = p_enabled;
		} break;
		default:
			break;
	}
}

bool DisplayServerWindows::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND_V(!windows.has(p_window), false);
	const WindowData &wd = windows[p_window];
	switch (p_flag) {
		case WINDOW_FLAG_MAXIMIZE_DISABLED: {
			return wd.no_max_btn;
		} break;
		case WINDOW_FLAG_MINIMIZE_DISABLED: {
			return wd.no_min_btn;
		} break;
		case WINDOW_FLAG_RESIZE_DISABLED: {
			return !wd.resizable;
		} break;
		case WINDOW_FLAG_BORDERLESS: {
			return wd.borderless;
		} break;
		case WINDOW_FLAG_ALWAYS_ON_TOP: {
			return wd.always_on_top;
		} break;
		case WINDOW_FLAG_SHARP_CORNERS: {
Repository: godotengine/godot
File: platform/windows/display_server_windows.cpp (C++)

Code before:

	FLASHWINFO info;
	info.cbSize = sizeof(FLASHWINFO);
	info.hwnd = wd.hWnd;
	info.dwFlags = FLASHW_ALL;
	info.dwTimeout = 0;
	info.uCount = 2;
	FlashWindowEx(&info);
}

void DisplayServerWindows::window_set_taskbar_progress_value(float p_value, WindowID p_window) {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND(!windows.has(p_window));
	const WindowData &wd = windows[p_window];

	if (taskbar == nullptr) {
		if (CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&taskbar) != S_OK) {
			taskbar = nullptr;
			return;
		} else {
			taskbar->HrInit();
		}
	}

	taskbar->SetProgressValue(wd.hWnd, std::round(p_value * 100000), 100000);
}

void DisplayServerWindows::window_set_taskbar_progress_state(ProgressState p_state, WindowID p_window) {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND(!windows.has(p_window));
	const WindowData &wd = windows[p_window];

	if (taskbar == nullptr) {
		if (CoCreateInstance(CLSID_TaskbarList, 0, CLSCTX_INPROC_SERVER, IID_ITaskbarList, (void **)&taskbar) != S_OK) {
			taskbar = nullptr;
			return;
		} else {
			taskbar->HrInit();
		}
	}

	TBPFLAG tbpf = TBPF_NOPROGRESS;
	switch (p_state) {
		case PROGRESS_STATE_NOPROGRESS:
			tbpf = TBPF_NOPROGRESS;
			break;
		case PROGRESS_STATE_INDETERMINATE:
			tbpf = TBPF_INDETERMINATE;
			break;

Review comment (suggestion):
```suggestion
	taskbar->SetProgressValue(wd.hWnd, Math::round(p_value * 100000), 100000);
```

Code after:
			_update_window_style(p_window);
		} break;
		case WINDOW_FLAG_MOUSE_PASSTHROUGH: {
			wd.mpass = p_enabled;
		} break;
		case WINDOW_FLAG_EXCLUDE_FROM_CAPTURE: {
			wd.hide_from_capture = p_enabled;
			if (p_enabled) {
				if (os_ver.dwBuildNumber >= 19041) {
					SetWindowDisplayAffinity(wd.hWnd, WDA_EXCLUDEFROMCAPTURE);
				} else {
					SetWindowDisplayAffinity(wd.hWnd, WDA_MONITOR);
				}
			} else {
				SetWindowDisplayAffinity(wd.hWnd, WDA_NONE);
			}
		} break;
		case WINDOW_FLAG_POPUP: {
			ERR_FAIL_COND_MSG(p_window == MAIN_WINDOW_ID, "Main window can't be popup.");
			ERR_FAIL_COND_MSG(IsWindowVisible(wd.hWnd) && (wd.is_popup != p_enabled), "Popup flag can't changed while window is opened.");
			if (p_enabled && wd.parent_hwnd) {
				print_line("Embedded window can't be popup.");
				return;
			}
			wd.is_popup = p_enabled;
		} break;
		default:
			break;
	}
}

bool DisplayServerWindows::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND_V(!windows.has(p_window), false);
	const WindowData &wd = windows[p_window];
	switch (p_flag) {
		case WINDOW_FLAG_MAXIMIZE_DISABLED: {
			return wd.no_max_btn;
		} break;
		case WINDOW_FLAG_MINIMIZE_DISABLED: {
			return wd.no_min_btn;
		} break;
		case WINDOW_FLAG_RESIZE_DISABLED: {
			return !wd.resizable;
		} break;
		case WINDOW_FLAG_BORDERLESS: {
			return wd.borderless;
		} break;
		case WINDOW_FLAG_ALWAYS_ON_TOP: {
			return wd.always_on_top;
Repository: godotengine/godot
File: platform/macos/godot_progress_view.mm (Objective-C++)

Code before:
		return;
	}

	// Border draw.
	NSRect rect = NSMakeRect(1.f, 1.f, self.bounds.size.width - 2.f, 16.f);
	NSBezierPath *bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:8.f yRadius:8.f];
	[bezier_path setLineWidth:2.0];
	[[NSColor grayColor] set];
	[bezier_path stroke];

	// Fill clip path.
	rect = NSMakeRect(2.f, 2.f, self.bounds.size.width - 4.f, 14.f);
	bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:7.f yRadius:7.f];
	[bezier_path setLineWidth:1.0];
	[bezier_path addClip];

	// Fill draw.
	if (pr_state == DisplayServer::PROGRESS_STATE_INDETERMINATE) {
		rect.size.width /= 5.0;
		pr_offset += rect.size.width / 10.0;
		if (pr_offset > self.bounds.size.width - rect.size.width) {
			pr_offset = 0.f;
		}
		rect.origin.x += pr_offset;
	} else {
		rect.size.width = floor(rect.size.width * pr_value);
	}
	if (pr_state == DisplayServer::PROGRESS_STATE_ERROR) {
		[[NSColor colorWithSRGBRed:1.0 green:0.2 blue:0.2 alpha:1.0] set];
	} else if (pr_state == DisplayServer::PROGRESS_STATE_PAUSED) {
		[[NSColor colorWithSRGBRed:1.0 green:1.0 blue:0.2 alpha:1.0] set];
	} else {
		[[NSColor colorWithSRGBRed:0.2 green:0.6 blue:1.0 alpha:1.0] set];
	}
	NSRectFill(rect);
}

@end


Review comment (suggestion):
```suggestion
		rect.size.width = Math::floor(rect.size.width * pr_value);
```

Code after:
		return;
	}

	// Border draw.
	NSRect rect = NSMakeRect(1.f, 1.f, self.bounds.size.width - 2.f, 16.f);
	NSBezierPath *bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:8.f yRadius:8.f];
	[bezier_path setLineWidth:2.0];
	[[NSColor grayColor] set];
	[bezier_path stroke];

	// Fill clip path.
	rect = NSMakeRect(2.f, 2.f, self.bounds.size.width - 4.f, 14.f);
	bezier_path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:7.f yRadius:7.f];
	[bezier_path setLineWidth:1.0];
	[bezier_path addClip];

	// Fill draw.
	if (pr_state == DisplayServer::PROGRESS_STATE_INDETERMINATE) {
		rect.size.width /= 5.0;
		pr_offset += rect.size.width / 10.0;
		if (pr_offset > self.bounds.size.width - rect.size.width) {
			pr_offset = 0.f;
		}
		rect.origin.x += pr_offset;
	} else {
		rect.size.width = Math::floor(rect.size.width * pr_value);
	}
	if (pr_state == DisplayServer::PROGRESS_STATE_ERROR) {
		[[NSColor colorWithSRGBRed:1.0 green:0.2 blue:0.2 alpha:1.0] set];
	} else if (pr_state == DisplayServer::PROGRESS_STATE_PAUSED) {
		[[NSColor colorWithSRGBRed:1.0 green:1.0 blue:0.2 alpha:1.0] set];
	} else {
		[[NSColor colorWithSRGBRed:0.2 green:0.6 blue:1.0 alpha:1.0] set];
	}
	NSRectFill(rect);
}

@end
Repository: godotengine/godot
File: platform/windows/display_server_windows.cpp (C++)

Code before:

	TBPFLAG tbpf = TBPF_NOPROGRESS;
	switch (p_state) {
		case PROGRESS_STATE_NOPROGRESS:
			tbpf = TBPF_NOPROGRESS;
			break;
		case PROGRESS_STATE_INDETERMINATE:
			tbpf = TBPF_INDETERMINATE;
			break;
		case PROGRESS_STATE_ERROR:
			tbpf = TBPF_ERROR;
			break;
		case PROGRESS_STATE_PAUSED:
			tbpf = TBPF_PAUSED;
			break;
		case PROGRESS_STATE_NORMAL:
			tbpf = TBPF_NORMAL;
			break;
		default:
			break;
	}

	taskbar->SetProgressState(wd.hWnd, tbpf);
}

void DisplayServerWindows::window_move_to_foreground(WindowID p_window) {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND(!windows.has(p_window));
	WindowData &wd = windows[p_window];

	if (!wd.no_focus && !wd.is_popup) {
		SetForegroundWindow(wd.hWnd);
	}
}

bool DisplayServerWindows::window_is_focused(WindowID p_window) const {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND_V(!windows.has(p_window), false);
	const WindowData &wd = windows[p_window];

	return wd.window_focused;
}

DisplayServerWindows::WindowID DisplayServerWindows::get_focused_window() const {
	return last_focused_window;
}

bool DisplayServerWindows::window_can_draw(WindowID p_window) const {
	_THREAD_SAFE_METHOD_

Review comment (suggestion):
```suggestion
	taskbar->SetProgressState(wd.hWnd, tbpf);
	taskbar->SetProgressValue(wd.hWnd, Math::round(wd.progress_value * 100000), 100000);
```

Code after:
			taskbar->HrInit();
		}
	}

	TBPFLAG tbpf = TBPF_NOPROGRESS;
	switch (p_state) {
		case PROGRESS_STATE_NOPROGRESS:
			tbpf = TBPF_NOPROGRESS;
			break;
		case PROGRESS_STATE_INDETERMINATE:
			tbpf = TBPF_INDETERMINATE;
			break;
		case PROGRESS_STATE_ERROR:
			tbpf = TBPF_ERROR;
			break;
		case PROGRESS_STATE_PAUSED:
			tbpf = TBPF_PAUSED;
			break;
		case PROGRESS_STATE_NORMAL:
			tbpf = TBPF_NORMAL;
			break;
		default:
			break;
	}

	taskbar->SetProgressState(wd.hWnd, tbpf);
	if (p_state != PROGRESS_STATE_INDETERMINATE) {
		taskbar->SetProgressValue(wd.hWnd, Math::round(wd.progress_value * 100000), 100000);
	}
}

void DisplayServerWindows::window_move_to_foreground(WindowID p_window) {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND(!windows.has(p_window));
	WindowData &wd = windows[p_window];

	if (!wd.no_focus && !wd.is_popup) {
		SetForegroundWindow(wd.hWnd);
	}
}

bool DisplayServerWindows::window_is_focused(WindowID p_window) const {
	_THREAD_SAFE_METHOD_

	ERR_FAIL_COND_V(!windows.has(p_window), false);
	const WindowData &wd = windows[p_window];

	return wd.window_focused;
}
Repository: godotengine/godot
File: editor/scene/3d/node_3d_editor_plugin.cpp (C++)

Code before:
			if (seg.is_null()) {
				continue;
			}
			seg->set_selected(false);
		}

		Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(selected);
		if (se) {
			se->gizmo.unref();
			se->subgizmos.clear();
		}
		selected->update_gizmos();
		selected = nullptr;
	}

	const List<Node *> &top_selected = editor_selection->get_top_selected_node_list();
	if (top_selected.size() == 1) {
		Node3D *new_selected = Object::cast_to<Node3D>(top_selected.back()->get());
		if (new_selected != selected) {
			edit(new_selected);
		}
	}

	update_transform_gizmo();
}

void Node3DEditor::_refresh_menu_icons() {
	bool all_locked = true;
	bool all_grouped = true;
	bool has_node3d_item = false;

	const List<Node *> &selection = editor_selection->get_top_selected_node_list();

	if (selection.is_empty()) {
		all_locked = false;
		all_grouped = false;
	} else {
		for (Node *E : selection) {
			Node3D *node = Object::cast_to<Node3D>(E);
			if (node) {
				if (all_locked && !node->has_meta("_edit_lock_")) {
					all_locked = false;
				}
				if (all_grouped && !node->has_meta("_edit_group_")) {
					all_grouped = false;
				}
				has_node3d_item = true;
			}
			if (!all_locked && !all_grouped) {
				break;
			}

Review comment (suggestion):
It might be worth adding a comment above the added block to explain why it's there:

```suggestion
	// Ensure gizmo updates are performed when the selection changes
	// outside of the 3D view (see GH-106713).
	const List<Node *> &top_selected = editor_selection->get_top_selected_node_list();
	if (top_selected.size() == 1) {
		Node3D *new_selected = Object::cast_to<Node3D>(top_selected.back()->get());
		if (new_selected != selected) {
			edit(new_selected);
		}
	}
```

Code after:
			if (seg.is_null()) {
				continue;
			}
			seg->set_selected(false);
		}

		Node3DEditorSelectedItem *se = editor_selection->get_node_editor_data<Node3DEditorSelectedItem>(selected);
		if (se) {
			se->gizmo.unref();
			se->subgizmos.clear();
		}
		selected->update_gizmos();
		selected = nullptr;
	}

	// Ensure gizmo updates are performed when the selection changes
	// outside of the 3D view (see GH-106713).
	if (!is_visible()) {
		const List<Node *> &top_selected = editor_selection->get_top_selected_node_list();
		if (top_selected.size() == 1) {
			Node3D *new_selected = Object::cast_to<Node3D>(top_selected.back()->get());
			if (new_selected != selected) {
				gizmos_dirty = true;
			}
		}
	}

	update_transform_gizmo();
}

void Node3DEditor::refresh_dirty_gizmos() {
	if (!gizmos_dirty) {
		return;
	}

	const List<Node *> &top_selected = editor_selection->get_top_selected_node_list();
	if (top_selected.size() == 1) {
		Node3D *new_selected = Object::cast_to<Node3D>(top_selected.back()->get());
		if (new_selected != selected) {
			edit(new_selected);
		}
	}
	gizmos_dirty = false;
}

void Node3DEditor::_refresh_menu_icons() {
	bool all_locked = true;
	bool all_grouped = true;
	bool has_node3d_item = false;

	const List<Node *> &selection = editor_selection->get_top_selected_node_list();
Repository: godotengine/godot
File: editor/editor_node.h (C/C++)

Code before:
		SCENE_NAME_CASING_KEBAB_CASE,
		SCENE_NAME_CASING_CAMEL_CASE,
	};

	enum ActionOnPlay {
		ACTION_ON_PLAY_DO_NOTHING,
		ACTION_ON_PLAY_OPEN_OUTPUT,
		ACTION_ON_PLAY_OPEN_DEBUGGER,
	};

	enum ActionOnStop {
		ACTION_ON_STOP_DO_NOTHING,
		ACTION_ON_STOP_CLOSE_BUTTOM_PANEL,
	};

	enum MenuOptions {
		// Scene menu.
		SCENE_NEW_SCENE,
		SCENE_NEW_INHERITED_SCENE,
		SCENE_OPEN_SCENE,
		SCENE_OPEN_PREV,
		SCENE_OPEN_RECENT,
		SCENE_SAVE_SCENE,
		SCENE_SAVE_AS_SCENE,
		SCENE_SAVE_ALL_SCENES,
		SCENE_MULTI_SAVE_AS_SCENE,
		SCENE_QUICK_OPEN,
		SCENE_QUICK_OPEN_SCENE,
		SCENE_QUICK_OPEN_SCRIPT,
		SCENE_UNDO,
		SCENE_REDO,
		SCENE_RELOAD_SAVED_SCENE,
		SCENE_CLOSE,
		SCENE_CLOSE_ALL,
		SCENE_QUIT,

		FILE_EXPORT_MESH_LIBRARY,

		// Project menu.
		PROJECT_OPEN_SETTINGS,
		PROJECT_FIND_IN_FILES,
		PROJECT_VERSION_CONTROL,
		PROJECT_EXPORT,
		PROJECT_PACK_AS_ZIP,
		PROJECT_INSTALL_ANDROID_SOURCE,
		PROJECT_OPEN_USER_DATA_FOLDER,
		PROJECT_RELOAD_CURRENT_PROJECT,
		PROJECT_QUIT_TO_PROJECT_MANAGER,

		TOOLS_ORPHAN_RESOURCES,
		TOOLS_BUILD_PROFILE_MANAGER,

Review comment (bug):
This is incorrect. You added an item to this enum without updating the corresponding `file_menu->` setup code in the `EditorNode` constructor.

I'm not sure why this even needs to be in this menu, I think `SCENE_SET_MAIN_SCENE` can just be deleted in favor of `SAVE_AND_SET_MAIN_SCENE`.

Code after:
		SCENE_NAME_CASING_KEBAB_CASE,
		SCENE_NAME_CASING_CAMEL_CASE,
	};

	enum ActionOnPlay {
		ACTION_ON_PLAY_DO_NOTHING,
		ACTION_ON_PLAY_OPEN_OUTPUT,
		ACTION_ON_PLAY_OPEN_DEBUGGER,
	};

	enum ActionOnStop {
		ACTION_ON_STOP_DO_NOTHING,
		ACTION_ON_STOP_CLOSE_BUTTOM_PANEL,
	};

	enum MenuOptions {
		// Scene menu.
		SCENE_NEW_SCENE,
		SCENE_NEW_INHERITED_SCENE,
		SCENE_OPEN_SCENE,
		SCENE_OPEN_PREV,
		SCENE_OPEN_RECENT,
		SCENE_SAVE_SCENE,
		SCENE_SAVE_AS_SCENE,
		SCENE_SAVE_ALL_SCENES,
		SCENE_SET_MAIN_SCENE,
		SCENE_MULTI_SAVE_AS_SCENE,
		SCENE_QUICK_OPEN,
		SCENE_QUICK_OPEN_SCENE,
		SCENE_QUICK_OPEN_SCRIPT,
		SCENE_UNDO,
		SCENE_REDO,
		SCENE_RELOAD_SAVED_SCENE,
		SCENE_CLOSE,
		SCENE_CLOSE_ALL,
		SCENE_QUIT,

		FILE_EXPORT_MESH_LIBRARY,

		// Project menu.
		PROJECT_OPEN_SETTINGS,
		PROJECT_FIND_IN_FILES,
		PROJECT_VERSION_CONTROL,
		PROJECT_EXPORT,
		PROJECT_PACK_AS_ZIP,
		PROJECT_INSTALL_ANDROID_SOURCE,
		PROJECT_OPEN_USER_DATA_FOLDER,
		PROJECT_RELOAD_CURRENT_PROJECT,
		PROJECT_QUIT_TO_PROJECT_MANAGER,

		TOOLS_ORPHAN_RESOURCES,
Repository: godotengine/godot
File: editor/scene/sprite_frames_editor_plugin.h (C/C++)

Code before:
#include "scene/resources/image_texture.h"
#include "scene/resources/sprite_frames.h"

class OptionButton;
class EditorFileDialog;

class ClipboardSpriteFrames : public Resource {
	GDCLASS(ClipboardSpriteFrames, Resource);

public:
	struct Frame {
		Ref<Texture2D> texture;
		float duration;
	};
	Vector<Frame> frames;
};

class ClipboardAnimation : public Resource {
	GDCLASS(ClipboardAnimation, Resource);

public:
	String animation_name;
	Vector<ClipboardSpriteFrames::Frame> frames;
	float animation_speed = 1.0f;
	bool animation_loop = false;
	bool is_copy = false;
};

class SpriteFramesEditor : public HSplitContainer {
	GDCLASS(SpriteFramesEditor, HSplitContainer);

	Ref<SpriteFrames> frames;
	Node *animated_sprite = nullptr;

	enum {
		PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
		PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
		PARAM_SIZE, // Keep "Size" values.
	};
	int dominant_param = PARAM_FRAME_COUNT;

	enum {
		FRAME_ORDER_SELECTION, // Order frames were selected in.

		// By Row.
		FRAME_ORDER_LEFT_RIGHT_TOP_BOTTOM,
		FRAME_ORDER_LEFT_RIGHT_BOTTOM_TOP,
		FRAME_ORDER_RIGHT_LEFT_TOP_BOTTOM,
		FRAME_ORDER_RIGHT_LEFT_BOTTOM_TOP,

		// By Column.

Review comment (suggestion):
The naming convention regarding the `animation_` prefix is ​​a bit inconsistent. I'd prefer to either remove it or add it to all fields except `is_copy` (`frames` also belongs to animation, as do all other fields except `is_copy`).

Code after:
#include "scene/resources/image_texture.h"
#include "scene/resources/sprite_frames.h"

class OptionButton;
class EditorFileDialog;

class ClipboardSpriteFrames : public Resource {
	GDCLASS(ClipboardSpriteFrames, Resource);

public:
	struct Frame {
		Ref<Texture2D> texture;
		float duration;
	};
	Vector<Frame> frames;
};

class ClipboardAnimation : public Resource {
	GDCLASS(ClipboardAnimation, Resource);

public:
	String name;
	Vector<ClipboardSpriteFrames::Frame> frames;
	float speed = 1.0f;
	bool loop = false;

	static Ref<ClipboardAnimation> from_sprite_frames(const Ref<SpriteFrames> &p_frames, const String &p_anim);
};

class SpriteFramesEditor : public HSplitContainer {
	GDCLASS(SpriteFramesEditor, HSplitContainer);

	Ref<SpriteFrames> frames;
	Node *animated_sprite = nullptr;

	enum {
		PARAM_USE_CURRENT, // Used in callbacks to indicate `dominant_param` should be not updated.
		PARAM_FRAME_COUNT, // Keep "Horizontal" & "Vertical" values.
		PARAM_SIZE, // Keep "Size" values.
	};
	int dominant_param = PARAM_FRAME_COUNT;

	enum {
		FRAME_ORDER_SELECTION, // Order frames were selected in.

		// By Row.
		FRAME_ORDER_LEFT_RIGHT_TOP_BOTTOM,
		FRAME_ORDER_LEFT_RIGHT_BOTTOM_TOP,
		FRAME_ORDER_RIGHT_LEFT_TOP_BOTTOM,
		FRAME_ORDER_RIGHT_LEFT_BOTTOM_TOP,