@@ -84,7 +84,7 @@ class AWIOOverlay : public OverlayContextBase
8484 ImGui::PushStyleColor (ImGuiCol_ButtonHovered, ImVec4 (0.3 , 0.3 , 0.3 , background_opacity * global_opacity));
8585 ImGui::PushStyleColor (ImGuiCol_Button, ImVec4 (0.0 , 0.0 , 0.0 , 0 .0f ));
8686 ImGui::PushStyleColor (ImGuiCol_Text, ColorWithAlpha (preference_storage.color_map [" TitleText" ], text_opacity * global_opacity));
87- ImGui::Begin (" AWIO" , nullptr , options->windows_default_sizes [ " AWIO" ] , -1 ,
87+ ImGui::Begin (" AWIO" , nullptr , options->GetDefaultSize ( " AWIO" , ImVec2 ( 500 , 200 )) , -1 ,
8888 ImGuiWindowFlags_NoTitleBar | (use_input ? NULL : ImGuiWindowFlags_NoInputs));
8989 options->windows_default_sizes [" AWIO" ] = ImGui::GetWindowSize ();
9090
@@ -97,6 +97,7 @@ class AWIOOverlay : public OverlayContextBase
9797 auto resize_img = images->find (" resize" );
9898 if (cog_img != images->end () && resize_img != images->end ())
9999 {
100+ double scale = (io.Fonts ->Fonts [0 ]->FontSize * io.FontGlobalScale ) / cog_img->second .height / 1 .5f ;
100101 ImGui::PushStyleColor (ImGuiCol_ChildWindowBg, ImVec4 (0 ,0 ,0 ,0 ));
101102 float icon_color_change = (cosf (GetTickCount () / 500 .0f ) + 1 .0f ) / 2 .0f ;
102103 ImVec4 color = ColorWithAlpha (preference_storage.color_map [" TitleText" ], text_opacity * global_opacity);
@@ -106,21 +107,21 @@ class AWIOOverlay : public OverlayContextBase
106107 auto p = ImGui::GetCursorPos ();
107108 ImGui::BeginChild (" Btn" ,
108109 // ImVec2(100,100),
109- ImVec2 ((cog_img->second .width + resize_img-> second . width + 36 ) * io. FontGlobalScale / 6 , (cog_img->second .height + 18 ) * io. FontGlobalScale / 6 ),
110+ ImVec2 ((cog_img->second .width + 18 ) * scale , (cog_img->second .height + 18 ) * scale ),
110111 false ,
111112 ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
112- if (ImGui::ImageButton (texture, ImVec2 (resize_img->second .width * io. FontGlobalScale / 6 , resize_img->second .height * io. FontGlobalScale / 6 ), resize_img->second .uv0 , resize_img->second .uv1 , 2 , ImVec4 (0 , 0 , 0 , 0 ), color))
113+ if (ImGui::ImageButton (texture, ImVec2 (resize_img->second .width * scale , resize_img->second .height * scale ), resize_img->second .uv0 , resize_img->second .uv1 , 2 , ImVec4 (0 , 0 , 0 , 0 ), color))
113114 {
114115 options->movable = !options->movable ;
115116 }
116117 ImGui::EndChild ();
117- ImGui::SameLine ((cog_img->second .width + 18 ) * io. FontGlobalScale / 6 );
118+ ImGui::SameLine ((cog_img->second .width + 18 ) * scale );
118119 ImGui::BeginChild (" Btn1" ,
119120 // ImVec2(100,100),
120- ImVec2 ((cog_img-> second . width + resize_img->second .width + 36 ) * io. FontGlobalScale / 6 , (cog_img->second .height + 18 ) * io. FontGlobalScale / 6 ),
121+ ImVec2 ((resize_img->second .width + 36 ) * scale , (cog_img->second .height + 18 ) * scale ),
121122 false ,
122123 ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
123- if (ImGui::ImageButton (texture, ImVec2 (cog_img->second .width * io. FontGlobalScale / 6 , cog_img->second .height * io. FontGlobalScale / 6 ), cog_img->second .uv0 , cog_img->second .uv1 , 2 , ImVec4 (0 , 0 , 0 , 0 ), color))
124+ if (ImGui::ImageButton (texture, ImVec2 (cog_img->second .width * scale , cog_img->second .height * scale ), cog_img->second .uv0 , cog_img->second .uv1 , 2 , ImVec4 (0 , 0 , 0 , 0 ), color))
124125 {
125126 options->show_preferences = !options->show_preferences ;
126127 }
0 commit comments