@@ -111,8 +111,31 @@ namespace EnigmaFix {
111
111
if (::Begin (LocUI.Strings .aboutEnigmaFix , p_open, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoCollapse))
112
112
{
113
113
float dpiScaleLogo = SettingsUI.INS .dpiScale / 100 .0f * SettingsUI.INS .dpiScaleMultiplier ;
114
+
115
+ float logoWidth = (static_cast <float >(LogoWidth) / 4 ) * dpiScaleLogo;
116
+ float logoHeight = (static_cast <float >(LogoHeight) / 4 ) * dpiScaleLogo;
117
+
118
+ // Save the current cursor position
119
+ float originalCursorPosX = ImGui::GetCursorPosX ();
120
+
121
+ // Calculate the horizontal center position and set the cursor position
122
+ float windowWidth = ImGui::GetWindowWidth ();
123
+ float imageXPos = (windowWidth - logoWidth) * 0 .5f ; // Center the image horizontally
124
+ ImGui::SetCursorPosX (imageXPos);
125
+
114
126
ImGui::Image (reinterpret_cast <ImTextureID>(Logo), ImVec2 ((static_cast <float >(LogoWidth) / 4 ) * dpiScaleLogo, (static_cast <float >(LogoHeight) / 4 ) * dpiScaleLogo));
115
- Text (" %s %s" , LocUI.Strings .enigmaFixName , LocUI.Strings .versionNumber );
127
+
128
+ // Restore the cursor position after the image
129
+ ImGui::SetCursorPosX (originalCursorPosX);
130
+
131
+ // Calculate the text width (this will give you the length of the text in pixels)
132
+ float textWidth = ImGui::CalcTextSize (LocUI.Strings .enigmaFixName ).x + ImGui::CalcTextSize (LocUI.Strings .versionNumber ).x + 10 .0f ; // 10.0f for a small space between the two strings
133
+
134
+ // Set the cursor to the center of the window minus half the text width
135
+ ImGui::SetCursorPosX ((windowWidth - textWidth) * 0 .5f );
136
+
137
+ // Render the centered text
138
+ Text (" %s %s %s" , LocUI.Strings .enigmaFixName , LocUI.Strings .versionNumber );
116
139
Separator ();
117
140
Text (" (C) 2021 Bryce Q." );
118
141
Text (" %s" , LocUI.Strings .enigmaFixLicense );
@@ -121,17 +144,22 @@ namespace EnigmaFix {
121
144
Text (" %s" , LocUI.Strings .specialThanksTo );
122
145
Text (" %s" , LocUI.Strings .specialThanksLine );
123
146
Text (" %s" , LocUI.Strings .specialThanksLine2 );
147
+ Text (" %s" , LocUI.Strings .specialThanksLine3 );
148
+ ImGui::PushTextWrapPos (ImGui::GetWindowWidth () * 0 .8f ); // Wrap text at 80% of the window width
149
+ Text (" %s" , LocUI.Strings .alsoSpecialThanksToLine );
150
+ Text (" %s" , LocUI.Strings .specialThanksLine4 );
124
151
Separator ();
125
152
Text (" %s" , LocUI.Strings .thirdPartySoftware );
126
153
Text (" %s" , LocUI.Strings .imguiLicense );
127
154
Text (" %s" , LocUI.Strings .kieroHookLicense );
128
155
Text (" %s" , LocUI.Strings .ghFearLicense );
129
- Text (" %s" , LocUI.Strings .thirteenAGIniLicense );
156
+ Text (" %s" , LocUI.Strings .inippLicense );
130
157
Text (" %s" , LocUI.Strings .thirteenAGAsiLicense );
131
- Text (" %s" , LocUI.Strings .minHookLicense );
132
- Text (" %s" , LocUI.Strings .modUtilsLicense );
158
+ Text (" %s" , LocUI.Strings .safetyHookLicense );
159
+ Text (" %s" , LocUI.Strings .zydisLicense );
133
160
Text (" %s" , LocUI.Strings .fontsLicense );
134
161
Text (" %s" , LocUI.Strings .fontAwesomeLicense );
162
+ ImGui::PopTextWrapPos (); // Reset word wrap
135
163
Separator ();
136
164
if (Button (LocUI.Strings .button_Close )) {
137
165
aboutPage = false ;
0 commit comments