@@ -48,14 +48,15 @@ class CustomTab
4848 }
4949
5050 ImGui::Text (" Method:" );
51- ImGui::SetNextItemWidth ( 600 . f );
52- ImGui::InputText (" ##inputMethod" , method, IM_ARRAYSIZE (method));
51+ const ImVec2 label_size = ImGui::CalcTextSize ( " W " , NULL , true );
52+ ImGui::InputTextEx (" ##inputMethod" , NULL , method, IM_ARRAYSIZE (method), ImVec2 (S. Window . width - 130 . f , label_size. y + ImGui::GetStyle (). FramePadding . y * 2 . 0f ), 0 , NULL , NULL );
5353
5454 ImGui::Text (" URL:" );
55- ImGui::InputTextMultiline (" ##inputUrl" , urlText, IM_ARRAYSIZE (urlText), ImVec2 (600 , 20 ));
55+ ImGui::InputTextMultiline (" ##inputUrl" , urlText, IM_ARRAYSIZE (urlText), ImVec2 (S. Window . width - 130 . f , label_size. y + ImGui::GetStyle (). FramePadding . y * 2 . 0f ));
5656
5757 ImGui::Text (" Body:" );
58- ImGui::InputTextMultiline (" ##inputBody" , (requestText), IM_ARRAYSIZE (requestText), ImVec2 (600 , 100 ), ImGuiInputTextFlags_AllowTabInput);
58+ ImGui::InputTextMultiline (" ##inputBody" , (requestText), IM_ARRAYSIZE (requestText), ImVec2 (S.Window .width - 130 .f ,
59+ (label_size.y + ImGui::GetStyle ().FramePadding .y ) * 6 .f ), ImGuiInputTextFlags_AllowTabInput);
5960
6061 S.customTab .method = method;
6162 S.customTab .urlText = urlText;
@@ -158,7 +159,8 @@ class CustomTab
158159 }
159160
160161 ImGui::Text (" Header:" );
161- ImGui::InputTextMultiline (" ##inputHeader" , (inputHeader), IM_ARRAYSIZE (inputHeader), ImVec2 (600 , 100 ), ImGuiInputTextFlags_AllowTabInput);
162+ ImGui::InputTextMultiline (" ##inputHeader" , (inputHeader), IM_ARRAYSIZE (inputHeader), ImVec2 (S.Window .width - 130 .f ,
163+ (label_size.y + ImGui::GetStyle ().FramePadding .y ) * 6 .f ), ImGuiInputTextFlags_AllowTabInput);
162164
163165 S.customTab .port = inputPort;
164166 S.customTab .header = inputHeader;
@@ -177,6 +179,8 @@ class CustomTab
177179 customPort = LCU::league.port ;
178180 }
179181
182+ ImGui::Columns (2 , 0 , false );
183+
180184 static std::string result;
181185 if (ImGui::Button (" Send custom request##customTab" ))
182186 {
@@ -217,6 +221,16 @@ class CustomTab
217221 }
218222 }
219223
224+ ImGui::NextColumn ();
225+
226+ ImGui::Text (" Endpoints list:" );
227+ ImGui::TextURL (" LCU" , " https://lcu.kebs.dev" , 1 , 0 );
228+ ImGui::SameLine ();
229+ ImGui::Text (" | " );
230+ ImGui::TextURL (" Riot Client" , " https://riotclient.kebs.dev" , 1 , 0 );
231+
232+ ImGui::Columns (1 );
233+
220234 if (!result.empty ())
221235 {
222236 Json::CharReaderBuilder builder;
@@ -235,7 +249,8 @@ class CustomTab
235249 if (!sResultJson .empty ())
236250 {
237251 cResultJson = &sResultJson [0 ];
238- ImGui::InputTextMultiline (" ##customResult" , cResultJson, sResultJson .size () + 1 , ImVec2 (600 , 300 ));
252+ ImGui::InputTextMultiline (" ##customResult" , cResultJson, sResultJson .size () + 1 , ImVec2 (S.Window .width - 130 .f ,
253+ (label_size.y + ImGui::GetStyle ().FramePadding .y ) * 19 .f ));
239254 }
240255 }
241256
0 commit comments