Repository: AsherGlick/Burrito
Pull request #444: Add setting to override Burrito icon position.
Author: login: aukuste
Created: 2025-04-17T13:13:02Z | Merged: 2025-04-19T00:49:48Z

This adds a toggle button and two text input fields that allows you to exactly specify the position of the Burrito icon.

I needed this because I also use Raidcore Nexus, which puts the icon in the exact same place as Burrito does, causing me to be unable to click on the Raidcore Nexus icon. This pull request aims to fix this issue by introducing a new setting that allows you to specify the position of the Burrito icon.

Now, regarding the changes to the .import files, I honestly have no clue why this happened and this wasn't a conscious change on my part. Is that something that I should revert?

The removal of "res://addons/protobuf/plugin.cfg" from the editor_plugins part in the project.godot file seems to happen every time I start Godot because the file doesn't exist in the repository, so I left that change in there.

Here's what the settings menu looks like now:
![Screenshot_20250417_144408](https://github.com/user-attachments/assets/2bb1fe34-97bc-4708-9933-29cd5b402625)

If there's anything that I should change with this pull request then please tell me and I'll change whatever is necessary. I'm unsure if this was the best way to implement this, but I'll try to explain my reasoning for some of the changes:

The introduction of GlobalMenuButton.gd:
This allows for realtime feedback when you change the position of the icon, instead of kind of randomly whenever the icon position is updated whenever Burrito Link (I think it's this anyway) sends an update or whatever.

The part where the tooltip text for the toggle button is set in Spatial.tscn:
Honestly not sure where I should've put this, but I feel like this is important so that you can perfectly pixel align the positioning by being able to see the default position data. Should I perhaps include what UI size the user is on in this tooltip? I don't feel like it's necessary tbh.


Diff:
diff --git a/GlobalMenuButton.gd b/GlobalMenuButton.gd
new file mode 100644
index 00000000..c8703828
--- /dev/null
+++ b/GlobalMenuButton.gd
@@ -0,0 +1,12 @@
+extends Control
+
+func _ready():
+	Settings.connect("settings_updated", self, "_update_global_menu_button_position")
+	_update_global_menu_button_position()
+
+func _update_global_menu_button_position():
+	if Settings.override_burrito_icon_position_enabled == true:
+		self.set_position(Vector2(Settings.override_burrito_icon_horizontal_position, Settings.override_burrito_icon_vertical_position))
+	else:
+		self.margin_left = Settings.button_margin[Settings.ui_size]["left"]
+		self.margin_right = Settings.button_margin[Settings.ui_size]["right"]
diff --git a/Settings.gd b/Settings.gd
index 2af0fb9b..71ec9ba4 100644
--- a/Settings.gd
+++ b/Settings.gd
@@ -1,7 +1,30 @@
 extends Node
 
+signal settings_updated
+
 const CONFIG_PATH = "user://settings.json"
 
+# Variables that store informations about ui scaling
+# This dictionary holds the left and right margin for the main button for every ui-scale
+const button_margin = {
+	0: {"left": 292, "right": 318}, # small
+	1: {"left": 323, "right": 352}, # normal
+	2: {"left": 361, "right": 394}, # large
+	3: {"left": 395, "right": 431}  # larger
+}
+
+const minimap_scale = {
+	0: {"offset": 32, "factor": 0.9}, # small
+	1: {"offset": 36, "factor": 1}, # normal
+	2: {"offset": 40, "factor": 1.11}, # large
+	3: {"offset": 44, "factor": 1.22} # larger
+}
+
+# The ui-size as read from the link can have the values [0=small; 1=normal; 2=large; 3=larger]
+var ui_size: int = 1
+
+# User settings
+
 var _config_data = {}
 var local_category_data = {}
 
@@ -12,6 +35,10 @@ var override_size_enabled: bool = false;
 var override_size_height: int = 1080
 var override_size_width: int = 1920
 
+var override_burrito_icon_position_enabled: bool = false;
+var override_burrito_icon_horizontal_position: int = 0
+var override_burrito_icon_vertical_position: int = 0
+
 var burrito_link_auto_launch_enabled: bool = false
 var burrito_link_wine_path: String = ""
 var burrito_link_env_args: String = ""
@@ -39,6 +66,12 @@ func _ready():
 		self.override_size_height = self._config_data["override_size_height"]
 	if "override_size_width" in self._config_data:
 		self.override_size_width = self._config_data["override_size_width"]
+	if "override_burrito_icon_position_enabled" in self._config_data:
+		self.override_burrito_icon_position_enabled = self._config_data["override_burrito_icon_position_enabled"]
+	if "override_burrito_icon_horizontal_position" in self._config_data:
+		self.override_burrito_icon_horizontal_position = self._config_data["override_burrito_icon_horizontal_position"]
+	if "override_burrito_icon_vertical_position" in self._config_data:
+		self.override_burrito_icon_vertical_position = self._config_data["override_burrito_icon_vertical_position"]
 	if "burrito_link_auto_launch_enabled" in self._config_data:
 		self.burrito_link_auto_launch_enabled = self._config_data["burrito_link_auto_launch_enabled"]
 	if "burrito_link_wine_path" in self._config_data:
@@ -54,6 +87,9 @@ func save():
 		"override_size_enabled": override_size_enabled,
 		"override_size_height": override_size_height,
 		"override_size_width": override_size_width,
+		"override_burrito_icon_position_enabled": override_burrito_icon_position_enabled,
+		"override_burrito_icon_horizontal_position": override_burrito_icon_horizontal_position,
+		"override_burrito_icon_vertical_position": override_burrito_icon_vertical_position,
 		"burrito_link_auto_launch_enabled": burrito_link_auto_launch_enabled,
 		"burrito_link_wine_path": burrito_link_wine_path,
 		"burrito_link_env_args": burrito_link_env_args,
@@ -63,3 +99,5 @@ func save():
 	var file = File.new()
 	file.open(CONFIG_PATH, File.WRITE)
 	file.store_string(JSON.print(self._config_data, "    "))
+
+	emit_signal("settings_updated")
diff --git a/SettingsDialog.gd b/SettingsDialog.gd
index a78b0458..3977f823 100644
--- a/SettingsDialog.gd
+++ b/SettingsDialog.gd
@@ -12,6 +12,12 @@ func load_settings():
 	override_height.text = String(Settings.override_size_height)
 	var override_width: LineEdit = $ScrollContainer/GridContainer/OverrideWidth
 	override_width.text = String(Settings.override_size_width)
+	var override_burrito_icon_position: CheckButton = $ScrollContainer/GridContainer/OverrideBurritoIconPosition
+	override_burrito_icon_position.pressed = Settings.override_burrito_icon_position_enabled
+	var override_burrito_icon_horizontal_position: LineEdit = $ScrollContainer/GridContainer/OverrideBurritoIconHorizontalPosition
+	override_burrito_icon_horizontal_position.text = String(Settings.override_burrito_icon_horizontal_position)
+	var override_burrito_icon_vertical_position: LineEdit = $ScrollContainer/GridContainer/OverrideBurritoIconVerticalPosition
+	override_burrito_icon_vertical_position.text = String(Settings.override_burrito_icon_vertical_position)
 
 	var autolaunch_burrito_link: CheckButton = $ScrollContainer/GridContainer/AutoLaunchBurritoLink
 	autolaunch_burrito_link.pressed = Settings.burrito_link_auto_launch_enabled
@@ -33,6 +39,19 @@ func save_settings(new_value=null):
 	var override_width: LineEdit = $ScrollContainer/GridContainer/OverrideWidth
 	Settings.override_size_width = int(override_width.text)
 
+	var override_burrito_icon_position: CheckButton = $ScrollContainer/GridContainer/OverrideBurritoIconPosition
+	Settings.override_burrito_icon_position_enabled = override_burrito_icon_position.pressed
+	override_burrito_icon_position.hint_tooltip = "Default horizontal positions:\n" \
+	+ "Small: {small}\n".format({"small": Settings.button_margin[0]["left"]}) \
+	+ "Normal: {normal}\n".format({"normal": Settings.button_margin[1]["left"]}) \
+	+ "Large: {large}\n".format({"large": Settings.button_margin[2]["left"]}) \
+	+ "Larger: {larger}\n".format({"larger": Settings.button_margin[3]["left"]})
+
+	var override_burrito_icon_horizontal_position: LineEdit = $ScrollContainer/GridContainer/OverrideBurritoIconHorizontalPosition
+	Settings.override_burrito_icon_horizontal_position = int(override_burrito_icon_horizontal_position.text)
+	var override_burrito_icon_vertical_position: LineEdit = $ScrollContainer/GridContainer/OverrideBurritoIconVerticalPosition
+	Settings.override_burrito_icon_vertical_position = int(override_burrito_icon_vertical_position.text)
+
 	var autolaunch_burrito_link: CheckButton = $ScrollContainer/GridContainer/AutoLaunchBurritoLink
 	Settings.burrito_link_auto_launch_enabled = autolaunch_burrito_link.pressed
 	var wine_path: LineEdit = $ScrollContainer/GridContainer/WinePath
diff --git a/Spatial.gd b/Spatial.gd
index 4cb1db22..735c63f9 100644
--- a/Spatial.gd
+++ b/Spatial.gd
@@ -67,23 +67,6 @@ onready var markers_3d := $Markers3D as Spatial
 onready var markers_2d := $Control/Markers2D as Node2D
 onready var overwrite_confirmation := $Control/Dialogs/ImportPackDialogs/OverwriteConfirm as ConfirmationDialog
 
-# Variables that store informations about ui scaling
-# The ui-size as read from the link can have the values [0=small; 1=normal; 2=large; 3=larger]
-var ui_size: int = 1
-# This dictionary holds the left and right margin for the main button for every ui-scale
-const button_margin = {
-	0: {"left": 292, "right": 318}, # small
-	1: {"left": 323, "right": 352}, # normal
-	2: {"left": 361, "right": 394}, # large
-	3: {"left": 395, "right": 431}  # larger
-}
-const minimap_scale = {
-	0: {"offset": 32, "factor": 0.9}, # small
-	1: {"offset": 36, "factor": 1}, # normal
-	2: {"offset": 40, "factor": 1.11}, # large
-	3: {"offset": 44, "factor": 1.22} # larger
-}
-
 # Called when the node enters the scene tree for the first time.
 func _ready():
 	self.markers_ui.set_column_expand(1, false)
@@ -99,6 +82,7 @@ func _ready():
 		OS.window_size = Vector2(Settings.override_size_width, Settings.override_size_height)
 	else:
 		OS.window_size = Vector2(Settings.minimum_width, Settings.minimum_height)
+
 	# Postion at top left corner
 	OS.set_window_position(Vector2(0,0))
 	set_minimal_mouse_block()
@@ -286,7 +270,7 @@ func decode_frame_packet(spb: StreamPeerBuffer):
 	if (!map_is_open):
 		map_size = Vector2(compass_width, compass_height)
 		if !compass_is_top_right:
-			map_corner = get_viewport().size - Vector2(compass_width, compass_height + self.minimap_scale[self.ui_size]["offset"])
+			map_corner = get_viewport().size - Vector2(compass_width, compass_height + Settings.minimap_scale[Settings.ui_size]["offset"])
 		else:
 			map_corner = Vector2(get_viewport().size.x - compass_width, 0)
 
@@ -359,18 +343,18 @@ func decode_context_packet(spb: StreamPeerBuffer):
 	# this to just be a radian to degree conversion.
 
 	# Calculations to dynamically place the main icon/button
-	self.ui_size = int(identity["uisz"])
+	Settings.ui_size = int(identity["uisz"])
 	# If the value is not part of the dictionary use the "normal" size.
-	if !self.button_margin.has(self.ui_size):
-		self.ui_size = 1
+	if !Settings.button_margin.has(Settings.ui_size):
+		Settings.ui_size = 1
+
+	$Control/GlobalMenuButton._update_global_menu_button_position()
 
-	$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
-	$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
 	if !is_any_dialog_visible():
 		set_minimal_mouse_block()
 
-	compass_width = compass_width * self.minimap_scale[self.ui_size]["factor"]
-	compass_height = compass_height * self.minimap_scale[self.ui_size]["factor"]
+	compass_width = compass_width * Settings.minimap_scale[Settings.ui_size]["factor"]
+	compass_height = compass_height * Settings.minimap_scale[Settings.ui_size]["factor"]
 
 	if self.map_id != old_map_id:
 		print("New Map")
@@ -402,7 +386,7 @@ func reset_minimap_masks(reset_3d: bool = true):
 	var compass_corner1 = Vector2(0, 0)
 	var compass_corner2 = viewport_size
 	if !map_is_open && !compass_is_top_right:
-		compass_corner1 = Vector2(viewport_size.x-compass_width, self.minimap_scale[self.ui_size]["offset"])
+		compass_corner1 = Vector2(viewport_size.x-compass_width, Settings.minimap_scale[Settings.ui_size]["offset"])
 		compass_corner2 = compass_corner1 + Vector2(compass_width, compass_height)
 	elif !map_is_open && compass_is_top_right:
 		compass_corner1 = viewport_size - Vector2(self.compass_width, self.compass_height)
diff --git a/Spatial.tscn b/Spatial.tscn
index 19586792..ff30ee23 100644
--- a/Spatial.tscn
+++ b/Spatial.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=19 format=2]
+[gd_scene load_steps=20 format=2]
 
 [ext_resource path="res://Spatial.gd" type="Script" id=1]
 [ext_resource path="res://shaders/range_indicators.shader" type="Shader" id=2]
@@ -13,6 +13,7 @@
 [ext_resource path="res://icon_new_point.png" type="Texture" id=11]
 [ext_resource path="res://SettingsDialog.gd" type="Script" id=12]
 [ext_resource path="res://Category3D.gd" type="Script" id=13]
+[ext_resource path="res://GlobalMenuButton.gd" type="Script" id=14]
 [ext_resource path="res://Category2D.gd" type="Script" id=15]
 
 [sub_resource type="Shader" id=1]
@@ -80,6 +81,7 @@ script = ExtResource( 15 )
 margin_left = 323.0
 margin_right = 349.0
 margin_bottom = 32.0
+script = ExtResource( 14 )
 __meta__ = {
 "_edit_use_anchors_": false
 }
@@ -673,7 +675,7 @@ __meta__ = {
 
 [node name="GridContainer" type="GridContainer" parent="Control/Dialogs/SettingsDialog/ScrollContainer"]
 margin_right = 384.0
-margin_bottom = 419.0
+margin_bottom = 436.0
 size_flags_horizontal = 3
 size_flags_vertical = 3
 columns = 2
@@ -683,123 +685,162 @@ __meta__ = {
 
 [node name="MinimumWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 5.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 19.0
 text = "Minimum Width"
 
 [node name="MinimumWidth" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
-margin_right = 384.0
+margin_left = 196.0
+margin_right = 372.0
 margin_bottom = 24.0
 size_flags_horizontal = 3
 
 [node name="MinimumHeightLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 33.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 47.0
 text = "Minimum Height"
 
 [node name="MinimumHeight" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 28.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 52.0
 size_flags_horizontal = 3
 
 [node name="OverrideSizeLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 69.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 83.0
 text = "Use Fixed Size"
 
 [node name="OverrideSize" type="CheckButton" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 56.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 96.0
 size_flags_horizontal = 3
 
 [node name="OverrideWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 105.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 119.0
 text = "Fixed Width"
 
 [node name="OverrideWidth" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 100.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 124.0
 size_flags_horizontal = 3
 
 [node name="OverrideHeightLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 133.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 147.0
 text = "Fixed Height"
 
 [node name="OverrideHeight" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 128.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 152.0
 size_flags_horizontal = 3
 
-[node name="HSeparator" type="HSeparator" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+[node name="OverrideBurritoIconPositionLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 169.0
+margin_right = 192.0
+margin_bottom = 183.0
+text = "Override Burrito Icon Position"
+
+[node name="OverrideBurritoIconPosition" type="CheckButton" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_left = 196.0
 margin_top = 156.0
-margin_right = 112.0
-margin_bottom = 160.0
+margin_right = 372.0
+margin_bottom = 196.0
+size_flags_horizontal = 3
+
+[node name="OverrideBurritoIconHorizontalPositionLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 205.0
+margin_right = 192.0
+margin_bottom = 219.0
+text = "Horizontal Icon Position"
+
+[node name="OverrideBurritoIconHorizontalPosition" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_left = 196.0
+margin_top = 200.0
+margin_right = 372.0
+margin_bottom = 224.0
+size_flags_horizontal = 3
+
+[node name="OverrideBurritoIconVerticalPositionLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 233.0
+margin_right = 192.0
+margin_bottom = 247.0
+text = "Vertical Icon Position"
+
+[node name="OverrideBurritoIconVerticalPosition" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_left = 196.0
+margin_top = 228.0
+margin_right = 372.0
+margin_bottom = 252.0
+size_flags_horizontal = 3
+
+[node name="HSeparator" type="HSeparator" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 256.0
+margin_right = 192.0
+margin_bottom = 260.0
 __meta__ = {
 "_edit_use_anchors_": false
 }
 
 [node name="HSeparator2" type="HSeparator" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
-margin_top = 156.0
-margin_right = 384.0
-margin_bottom = 160.0
+margin_left = 196.0
+margin_top = 256.0
+margin_right = 372.0
+margin_bottom = 260.0
 __meta__ = {
 "_edit_use_anchors_": false
 }
 
 [node name="AutoLaunchBurritoLinkLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_top = 168.0
-margin_right = 112.0
-margin_bottom = 199.0
+margin_top = 268.0
+margin_right = 192.0
+margin_bottom = 299.0
 text = "Auto Launch
 Burrito Link"
 
 [node name="AutoLaunchBurritoLink" type="CheckButton" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
-margin_top = 164.0
-margin_right = 384.0
-margin_bottom = 204.0
+margin_left = 196.0
+margin_top = 264.0
+margin_right = 372.0
+margin_bottom = 304.0
 size_flags_horizontal = 3
 
 [node name="WinePathLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_top = 213.0
-margin_right = 112.0
-margin_bottom = 227.0
+margin_top = 313.0
+margin_right = 192.0
+margin_bottom = 327.0
 text = "Wine Path"
 
 [node name="WinePath" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
-margin_top = 208.0
-margin_right = 384.0
-margin_bottom = 232.0
+margin_left = 196.0
+margin_top = 308.0
+margin_right = 372.0
+margin_bottom = 332.0
 size_flags_horizontal = 3
 
 [node name="EnvironmentVarsLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_top = 279.0
-margin_right = 112.0
-margin_bottom = 293.0
+margin_top = 379.0
+margin_right = 192.0
+margin_bottom = 393.0
 text = "Environment Vars"
 
 [node name="EnvironmentVars" type="TextEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
-margin_top = 236.0
-margin_right = 384.0
-margin_bottom = 336.0
+margin_left = 196.0
+margin_top = 336.0
+margin_right = 372.0
+margin_bottom = 436.0
 rect_min_size = Vector2( 0, 100 )
 size_flags_horizontal = 3
 
@@ -969,6 +1010,9 @@ material/0 = SubResource( 4 )
 [connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideSize" to="Control/Dialogs/SettingsDialog" method="save_settings"]
 [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideWidth" to="Control/Dialogs/SettingsDialog" method="save_settings"]
 [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideHeight" to="Control/Dialogs/SettingsDialog" method="save_settings"]
+[connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideBurritoIconPosition" to="Control/Dialogs/SettingsDialog" method="save_settings"]
+[connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideBurritoIconHorizontalPosition" to="Control/Dialogs/SettingsDialog" method="save_settings"]
+[connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideBurritoIconVerticalPosition" to="Control/Dialogs/SettingsDialog" method="save_settings"]
 [connection signal="pressed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/AutoLaunchBurritoLink" to="Control/Dialogs/SettingsDialog" method="save_settings"]
 [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/WinePath" to="Control/Dialogs/SettingsDialog" method="save_settings"]
 [connection signal="text_changed" from="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/EnvironmentVars" to="Control/Dialogs/SettingsDialog" method="save_settings"]


Reviews:
user: login: AsherGlick
body: Thanks for the PR! I like the overall concept. I have a few notes on the implementation but otherwise it looks good.
state: CHANGES_REQUESTED
author_association: OWNER
submitted_at: 2025-04-17T14:32:27Z
user: login: aukuste
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-17T16:38:26Z
user: login: aukuste
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-17T16:41:17Z
user: login: aukuste
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-17T16:44:48Z
user: login: aukuste
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-17T16:51:34Z
user: login: AsherGlick
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-18T00:12:17Z
user: login: aukuste
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-18T18:37:52Z
user: login: AsherGlick
state: APPROVED
author_association: OWNER
submitted_at: 2025-04-19T00:49:02Z

Review comments:
diff_hunk: @@ -364,8 +373,12 @@ func decode_context_packet(spb: StreamPeerBuffer):
 	if !self.button_margin.has(self.ui_size):
 		self.ui_size = 1
 
-	$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
-	$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
+	if Settings.override_burrito_icon_position_enabled == true:
+		$Control/GlobalMenuButton.set_position(Vector2(Settings.override_burrito_icon_horizontal_position, Settings.override_burrito_icon_vertical_position))
+	else:
+		$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
+		$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
+
path: Spatial.gd
user: login: AsherGlick
body: I think this `else` block should be moved to be within `GlobalMenuButton.gd` and this line should just call `GlobalMenuButton.set_position(...)`. Having one place that controls the position of the UI node makes it easier to understand. Also, with this code here if the user disabled the position override, will the icon return to its default position?
created_at: 2025-04-17T14:02:14Z
author_association: OWNER
diff_hunk: @@ -99,6 +99,15 @@ func _ready():
 		OS.window_size = Vector2(Settings.override_size_width, Settings.override_size_height)
 	else:
 		OS.window_size = Vector2(Settings.minimum_width, Settings.minimum_height)
+
+	$Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideBurritoIconPosition.hint_tooltip = "Default horizontal positions:\n" \
++ "Small: {small}\n".format({"small": button_margin[0]["left"]}) \
++ "Normal: {normal}\n".format({"normal": button_margin[1]["left"]}) \
++ "Large: {large}\n".format({"large": button_margin[2]["left"]}) \
++ "Larger: {larger}\n".format({"larger": button_margin[3]["left"]}) \
++ "\n" \
++ "Width of icon: {icon_width}".format({"icon_width": $Control/GlobalMenuButton/TextureRect.get_texture().get_size().x})
+
path: Spatial.gd
user: login: AsherGlick
body: This feels like it should be inside of SettingsDialog.gd. I am guessing it is here because the constant `button_margin` is here and importing that elsewhere is difficult.

Lets move `button_margin` and `minimap_scale` to settings.gd. Then when we need to access that data in this file or in the settings dialog file we can access it via the settings singleton. This way all of the modifications and configurations for the settings dialog scene is contained within the settings dialog file and easy to locate.
created_at: 2025-04-17T14:08:39Z
author_association: OWNER
diff_hunk: @@ -22,6 +22,8 @@ materials/storage=1
 materials/keep_on_reimport=true
 meshes/compress=true
 meshes/ensure_tangents=true
+meshes/octahedral_compression=true
+meshes/vertex_cache_optimization=true
path: Gizmo/gizmo_base.glb.import
user: login: AsherGlick
body: I am not sure why godot wanted to update all these .import files. Usually it does not do that when we are all using the same version of godot (which is what the version restrict plugin tries to force). But I dont think any of these changes are relevant to the PR, so lets revert all of the .import changes.
created_at: 2025-04-17T14:17:33Z
author_association: OWNER
diff_hunk: @@ -49,7 +49,7 @@ window/per_pixel_transparency/enabled=true
 
 [editor_plugins]
 
-enabled=PoolStringArray( "res://addons/protobuf/plugin.cfg", "res://addons/version_restrict/plugin.cfg" )
path: project.godot
user: login: AsherGlick
body: Lets revert this as well.

@klingbolt can you look into this and see what we can do about either including the plugin (if the licenses are compatible) or removing it from this plugin list.
created_at: 2025-04-17T14:19:45Z
author_association: OWNER
diff_hunk: @@ -683,123 +685,162 @@ __meta__ = {
 
 [node name="MinimumWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 5.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 19.0
 text = "Minimum Width"
 
 [node name="MinimumWidth" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
-margin_right = 384.0
+margin_left = 196.0
+margin_right = 372.0
 margin_bottom = 24.0
 size_flags_horizontal = 3
 
 [node name="MinimumHeightLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 33.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 47.0
 text = "Minimum Height"
 
 [node name="MinimumHeight" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 28.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 52.0
 size_flags_horizontal = 3
 
 [node name="OverrideSizeLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 69.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 83.0
 text = "Use Fixed Size"
 
 [node name="OverrideSize" type="CheckButton" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 56.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 96.0
 size_flags_horizontal = 3
 
 [node name="OverrideWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 105.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 119.0
 text = "Fixed Width"
 
 [node name="OverrideWidth" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 100.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 124.0
 size_flags_horizontal = 3
 
 [node name="OverrideHeightLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 133.0
-margin_right = 112.0
+margin_right = 192.0
 margin_bottom = 147.0
 text = "Fixed Height"
 
 [node name="OverrideHeight" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
-margin_left = 116.0
+margin_left = 196.0
 margin_top = 128.0
-margin_right = 384.0
+margin_right = 372.0
 margin_bottom = 152.0
 size_flags_horizontal = 3
 
-[node name="HSeparator" type="HSeparator" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+[node name="OverrideBurritoIconPositionLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 169.0
+margin_right = 192.0
+margin_bottom = 183.0
+text = "Override Burrito Icon Position"
+
+[node name="OverrideBurritoIconPosition" type="CheckButton" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_left = 196.0
 margin_top = 156.0
-margin_right = 112.0
-margin_bottom = 160.0
+margin_right = 372.0
+margin_bottom = 196.0
+size_flags_horizontal = 3
+
+[node name="OverrideBurritoIconHorizontalPositionLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 205.0
+margin_right = 192.0
+margin_bottom = 219.0
+text = "Horizontal Icon Position"
+
+[node name="OverrideBurritoIconHorizontalPosition" type="LineEdit" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_left = 196.0
+margin_top = 200.0
+margin_right = 372.0
+margin_bottom = 224.0
+size_flags_horizontal = 3
+
+[node name="OverrideBurritoIconVerticalPositionLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
+margin_top = 233.0
+margin_right = 192.0
+margin_bottom = 247.0
+text = "Horizontal Icon Position"
path: Spatial.tscn
user: login: AsherGlick
body: ```suggestion
text = "Vertical Icon Position"
```
created_at: 2025-04-17T14:23:24Z
author_association: OWNER
diff_hunk: @@ -683,123 +685,162 @@ __meta__ = {
 
 [node name="MinimumWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 5.0
-margin_right = 112.0
+margin_right = 192.0
path: Spatial.tscn
user: login: AsherGlick
body: Can you add a before/after image to the pr? I want to see what is causing all the `margin_left` `margin_right` deltas. I am guessing it is just one of the new labels you added being wider than and of the previous labels, which is fine.
created_at: 2025-04-17T14:24:48Z
author_association: OWNER
diff_hunk: @@ -364,8 +373,12 @@ func decode_context_packet(spb: StreamPeerBuffer):
 	if !self.button_margin.has(self.ui_size):
 		self.ui_size = 1
 
-	$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
-	$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
+	if Settings.override_burrito_icon_position_enabled == true:
+		$Control/GlobalMenuButton.set_position(Vector2(Settings.override_burrito_icon_horizontal_position, Settings.override_burrito_icon_vertical_position))
+	else:
+		$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
+		$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
+
path: Spatial.gd
user: login: aukuste
body: > I think this else block should be moved to be within GlobalMenuButton.gd and this line should just call GlobalMenuButton.set_position(...). Having one place that controls the position of the UI node makes it easier to understand.

Agreed. This would however require me to move ui_size from Spatial.gd to Settings.gd (because of it being a singleton) however, because ui_size needs to be available globally since it's required for setting the horizontal position of the icon. Would it be fine if I moved ui_size to Settings.gd? Or do you have a better solution in mind?

> Also, with this code here if the user disabled the position override, will the icon return to its default position?

Yes. It wouldn't happen instantly, but it'd happen within about 1-2 seconds after turning off the setting. The decode_context_packet function runs now and then so the position update would happen in a reasonable amount of time at least (I'm not familiar enough with the code base yet, but it's what I've noticed during testing at least).

I've made some changes so that the position of the icon is updated via the _update_global_menu_button_position function in GlobalMenuButton.gd in that part of the code in Spatial.gd, which also results in the position change being instant when you turn the position override setting on and off.
created_at: 2025-04-17T16:38:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -99,6 +99,15 @@ func _ready():
 		OS.window_size = Vector2(Settings.override_size_width, Settings.override_size_height)
 	else:
 		OS.window_size = Vector2(Settings.minimum_width, Settings.minimum_height)
+
+	$Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer/OverrideBurritoIconPosition.hint_tooltip = "Default horizontal positions:\n" \
++ "Small: {small}\n".format({"small": button_margin[0]["left"]}) \
++ "Normal: {normal}\n".format({"normal": button_margin[1]["left"]}) \
++ "Large: {large}\n".format({"large": button_margin[2]["left"]}) \
++ "Larger: {larger}\n".format({"larger": button_margin[3]["left"]}) \
++ "\n" \
++ "Width of icon: {icon_width}".format({"icon_width": $Control/GlobalMenuButton/TextureRect.get_texture().get_size().x})
+
path: Spatial.gd
user: login: aukuste
body: > This feels like it should be inside of SettingsDialog.gd. I am guessing it is here because the constant `button_margin` is here and importing that elsewhere is difficult.

Yep, that's exactly why.

> Lets move `button_margin` and `minimap_scale` to settings.gd. Then when we need to access that data in this file or in the settings dialog file we can access it via the settings singleton. This way all of the modifications and configurations for the settings dialog scene is contained within the settings dialog file and easy to locate.

I was thinking of doing this, but I wanted to make changes that were as non-disruptive as possible in terms of code changes. But with confirmation from you that it's fine, I've gone ahead and made that change locally. Will commit and push my changes either later today or tomorrow.
created_at: 2025-04-17T16:41:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -22,6 +22,8 @@ materials/storage=1
 materials/keep_on_reimport=true
 meshes/compress=true
 meshes/ensure_tangents=true
+meshes/octahedral_compression=true
+meshes/vertex_cache_optimization=true
path: Gizmo/gizmo_base.glb.import
user: login: aukuste
body: It may have been because I tried to open the project with Godot 4.4.1 at first, which failed, and informed me to use Godot 3. So I tried loading the project with Godot 3.6, but that didn't work either, but it may have been the cause for these .import changes?

Some info in the README about how to build the project, and what version of Godot to use would probably be a good idea. Wasn't too hard to figure it out eventually, but I was a bit puzzled when the project wouldn't build in Godot :)
created_at: 2025-04-17T16:44:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -22,6 +22,8 @@ materials/storage=1
 materials/keep_on_reimport=true
 meshes/compress=true
 meshes/ensure_tangents=true
+meshes/octahedral_compression=true
+meshes/vertex_cache_optimization=true
path: Gizmo/gizmo_base.glb.import
user: login: aukuste
body: I'll revert the changes of course, just to make that clear.
created_at: 2025-04-17T16:51:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -364,8 +373,12 @@ func decode_context_packet(spb: StreamPeerBuffer):
 	if !self.button_margin.has(self.ui_size):
 		self.ui_size = 1
 
-	$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
-	$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
+	if Settings.override_burrito_icon_position_enabled == true:
+		$Control/GlobalMenuButton.set_position(Vector2(Settings.override_burrito_icon_horizontal_position, Settings.override_burrito_icon_vertical_position))
+	else:
+		$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
+		$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
+
path: Spatial.gd
user: login: AsherGlick
body: > Agreed. This would however require me to move ui_size from Spatial.gd to Settings.gd (because of it being a singleton) however, because ui_size needs to be available globally since it's required for setting the horizontal position of the icon. Would it be fine if I moved ui_size to Settings.gd? Or do you have a better solution in mind?

Lets move ui_size to settings.gd. In most of my projects that have settings files I see "state" objects eventually get moved into the settings module, then if there are too many pieces of state they are broken out. Lets not have ui_size as a saveable setting though, just as a state that happens to live in settings for now.
created_at: 2025-04-18T00:12:17Z
author_association: OWNER
diff_hunk: @@ -683,123 +685,162 @@ __meta__ = {
 
 [node name="MinimumWidthLabel" type="Label" parent="Control/Dialogs/SettingsDialog/ScrollContainer/GridContainer"]
 margin_top = 5.0
-margin_right = 112.0
+margin_right = 192.0
path: Spatial.tscn
user: login: aukuste
body: See my comment here: https://github.com/AsherGlick/Burrito/pull/444#issuecomment-2815998414
created_at: 2025-04-18T18:37:52Z
author_association: CONTRIBUTOR

PR comments:
user: login: aukuste
created_at: 2025-04-18T18:37:38Z
body: Settings menu before my changes (based on commit c66019b1e65c5e0bbf08f4bc44bcb3ec8917b986):
![Screenshot_20250418_203314](https://github.com/user-attachments/assets/5715b1d6-c6ed-4a4b-add0-614e5625e3f0)

After my changes (as of commit c766600028fa6cc41ad41680ec5ab62bb19d2f66):
![Screenshot_20250418_203421](https://github.com/user-attachments/assets/df2906da-3ac5-4c4d-bd81-ee1937fe0600)

I'm slightly bothered about the scroll bar showing up there, so I may have a look at that. Hopefully that's not too hard to fix.
author_association: CONTRIBUTOR
user: login: aukuste
created_at: 2025-04-18T18:38:58Z
body: Are there any other changes that I should make, or does it look good as it is right now?
author_association: CONTRIBUTOR
user: login: AsherGlick
created_at: 2025-04-19T00:49:43Z
body: Looks good, I am not too concerned about the scroll bar, it was going to happen eventually.
author_association: OWNER