diff --git a/README.md b/README.md
index 91b8f7ab..87c4404e 100644
--- a/README.md
+++ b/README.md
@@ -162,7 +162,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `font_glyph_ranges` | Specify extra font glyph ranges, comma separated: `korean`, `chinese`, `chinese_simplified`, `japanese`, `cyrillic`, `thai`, `vietnamese`, `latin_ext_a`, `latin_ext_b`. If you experience crashes or text is just squares, reduce font size or glyph ranges. |
| `no_small_font` | Use primary font size for smaller text like units |
| `width=`
`height=` | Customizeable hud dimensions (in pixels) |
-| `position=` | Location of the hud: `top-left` (default), `top-right`, `bottom-left`, `bottom-right`, `top-center` |
+| `position=` | Location of the hud: `top-left` (default), `top-right`, `middle-left`, `middle-right`, `bottom-left`, `bottom-right`, `top-center` |
| `offset_x` `offset_y` | Hud position offsets |
| `no_display` | Hide the hud by default |
| `toggle_hud=`
`toggle_logging=` | Modifiable toggle hotkeys. Default are `Shift_R+F12` and `Shift_L+F2`, respectively. |
diff --git a/src/overlay.cpp b/src/overlay.cpp
index 976dd8ac..ebdf0d08 100644
--- a/src/overlay.cpp
+++ b/src/overlay.cpp
@@ -190,6 +190,14 @@ void position_layer(struct swapchain_stats& data, struct overlay_params& params,
data.main_window_pos = ImVec2(width - window_size.x - margin + params.offset_x, margin + params.offset_y);
ImGui::SetNextWindowPos(data.main_window_pos, ImGuiCond_Always);
break;
+ case LAYER_POSITION_MIDDLE_LEFT:
+ data.main_window_pos = ImVec2(margin + params.offset_x, height / 2 - window_size.y / 2 - margin + params.offset_y);
+ ImGui::SetNextWindowPos(data.main_window_pos, ImGuiCond_Always);
+ break;
+ case LAYER_POSITION_MIDDLE_RIGHT:
+ data.main_window_pos = ImVec2(width - window_size.x - margin + params.offset_x, height / 2 - window_size.y / 2 - margin + params.offset_y);
+ ImGui::SetNextWindowPos(data.main_window_pos, ImGuiCond_Always);
+ break;
case LAYER_POSITION_BOTTOM_LEFT:
data.main_window_pos = ImVec2(margin + params.offset_x, height - window_size.y - margin + params.offset_y);
ImGui::SetNextWindowPos(data.main_window_pos, ImGuiCond_Always);
diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp
index b1fc586f..86450fa0 100644
--- a/src/overlay_params.cpp
+++ b/src/overlay_params.cpp
@@ -74,6 +74,10 @@ parse_position(const char *str)
return LAYER_POSITION_TOP_LEFT;
if (!strcmp(str, "top-right"))
return LAYER_POSITION_TOP_RIGHT;
+ if (!strcmp(str, "middle-left"))
+ return LAYER_POSITION_MIDDLE_LEFT;
+ if (!strcmp(str, "middle-right"))
+ return LAYER_POSITION_MIDDLE_RIGHT;
if (!strcmp(str, "bottom-left"))
return LAYER_POSITION_BOTTOM_LEFT;
if (!strcmp(str, "bottom-right"))
diff --git a/src/overlay_params.h b/src/overlay_params.h
index 33b5367d..4c7663f7 100644
--- a/src/overlay_params.h
+++ b/src/overlay_params.h
@@ -143,6 +143,8 @@ typedef unsigned long KeySym;
enum overlay_param_position {
LAYER_POSITION_TOP_LEFT,
LAYER_POSITION_TOP_RIGHT,
+ LAYER_POSITION_MIDDLE_LEFT,
+ LAYER_POSITION_MIDDLE_RIGHT,
LAYER_POSITION_BOTTOM_LEFT,
LAYER_POSITION_BOTTOM_RIGHT,
LAYER_POSITION_TOP_CENTER,