@@ -46,11 +46,16 @@ static void DrawBackgroundDev()
4646{
4747 auto & res = ImGui::GetIO ().DisplaySize ;
4848 auto drawList = ImGui::GetBackgroundDrawList ();
49-
50- const uint32_t TOP = IM_COL32 (0 , 103 , 255 , 255 );
51- const uint32_t BOTTOM = IM_COL32 (0 , 40 , 100 , 255 );
52-
53- drawList->AddRectFilledMultiColor ({ 0.0 , 0.0 }, res, TOP, TOP, BOTTOM, BOTTOM);
49+ if (Config::DevTitle == EDevTitleMenu::Custom)
50+ {
51+ const uint32_t TOP = IM_COL32 (0 , 103 , 255 , 255 );
52+ const uint32_t BOTTOM = IM_COL32 (0 , 40 , 100 , 255 );
53+ drawList->AddRectFilledMultiColor ({ 0.0 , 0.0 }, res, TOP, TOP, BOTTOM, BOTTOM);
54+ }
55+ else
56+ {
57+ drawList->AddRectFilledMultiColor ({ 0.0 , 0.0 }, res, 0 , 0 , 0 , 0 );
58+ }
5459}
5560
5661static void DrawTextDev (const char * text,float posX, float posY,float vfontSize= 24 , uint32_t alpha = 255 , uint32_t center = CenterFlag::X)
@@ -84,9 +89,9 @@ static void DrawTextDev(const char* text,float posX, float posY,float vfontSize=
8489}
8590
8691// 05.08.2025 TODO Kanju Display
92+ // 31.08.2025 CLANG Version
8793static std::string ConvertShiftJISToUTF8 (const std::string& sjisStr)
8894{
89-
9095 int wlen = MultiByteToWideChar (932 , 0 , sjisStr.c_str (), -1 , nullptr , 0 );
9196 std::wstring wstr (wlen, 0 );
9297 MultiByteToWideChar (932 , 0 , sjisStr.c_str (), -1 , &wstr[0 ], wlen);
@@ -128,7 +133,13 @@ static bool Sonic06Button(ImVec2 pos, const char* label, bool& hovered, const Im
128133 bool pressed = hovered && ImGui::IsMouseClicked (ImGuiMouseButton_Left);
129134
130135 // Colors
131- const ImU32 col_base IM_COL32 (0 , 6 , 142 , 255 ), col_hover IM_COL32 (0 , 26 , 162 , 255 );
136+ ImU32 col_base = 0 ;
137+ ImU32 col_hover = 0 ;
138+ if (Config::DevTitle == EDevTitleMenu::Custom)
139+ {
140+ col_base = IM_COL32 (0 , 6 , 142 , 255 );
141+ col_hover = IM_COL32 (0 , 26 , 162 , 255 );
142+ }
132143
133144 const ImU32 bg[4 ] =
134145 {
@@ -174,21 +185,28 @@ static void DrawStageMapSelector()
174185 return ;
175186
176187 DrawBackgroundDev ();
177- DrawHUD ({ 0 , 0 }, res, g_mnewRodinFont, pMode->m_StageMapName .get ());
178188
179- const float WINDOW_WIDTH = 0 .8f * res.x ;
180- const float BUTTON_HEIGHT = 0 .05f * res.y ;
181- const float BUTTON_SPACING = 5 .0f ;
182- const int VISIBLE_ITEMS = 9 ;
183- const float ITEMS_SCALE_HEIGHT = 0 .05f * Video::s_viewportHeight;
184- const float WINDOW_HEIGHT = (BUTTON_HEIGHT + BUTTON_SPACING) * VISIBLE_ITEMS + ITEMS_SCALE_HEIGHT;
189+ if (Config::DevTitle == EDevTitleMenu::Custom) DrawHUD ({ 0 , 0 }, res, g_mnewRodinFont, pMode->m_StageMapName .get ());
190+
191+ float WINDOW_WIDTH = 0 .8f * res.x ;
192+ float BUTTON_HEIGHT = 0 .05f * res.y ;
193+ float BUTTON_SPACING = 5 .0f ;
194+ int VISIBLE_ITEMS = 9 ;
195+ float ITEMS_SCALE_HEIGHT = 0 .05f * Video::s_viewportHeight;
196+ float WINDOW_HEIGHT = (BUTTON_HEIGHT + BUTTON_SPACING) * VISIBLE_ITEMS + ITEMS_SCALE_HEIGHT;
185197
186- // Calculate base position for the selector
187- const ImVec2 base_pos = {
198+ ImVec2 base_pos = {
188199 (res.x - WINDOW_WIDTH) * 0 .15f ,
189200 (res.y - WINDOW_HEIGHT) * 0 .45f
190- };
191-
201+ };
202+
203+ if (Config::DevTitle == EDevTitleMenu::True)
204+ {
205+ VISIBLE_ITEMS = 18 ;
206+ base_pos.x = 0 ;
207+ base_pos.y = 0 ;
208+ }
209+
192210 auto & items = pMode->m_CurrentStageMap ->m_vpStageMap ;
193211 const int itemCount = static_cast <int >(items.size ());
194212 int currentIdx = pMode->m_CurrentStageMapIndex .get ();
@@ -224,8 +242,17 @@ static void DrawStageMapSelector()
224242 base_pos.x + 10 ,
225243 base_pos.y + 40 + visible_index * (BUTTON_HEIGHT + BUTTON_SPACING)
226244 };
245+ std::string item_name = item->m_Name .c_str ();
246+ if (item->m_vpStageMap .size () > 1 )
247+ {
248+ item_name = " [" + item_name + " ]" ; // mark as group
249+ }
250+ if (isSelected)
251+ {
252+ item_name = " >> " + item_name;
253+ }
227254
228- if (Sonic06Button (button_pos, item-> m_Name .c_str (),hovered,
255+ if (Sonic06Button (button_pos, item_name .c_str (), hovered,
229256 ImVec2 (WINDOW_WIDTH - 20 , BUTTON_HEIGHT), isSelected,CenterFlag::Y))
230257 {
231258 currentIdx = i;
@@ -235,7 +262,7 @@ static void DrawStageMapSelector()
235262 }
236263
237264 // Tooltip with stage information
238- if (hovered && item->m_vpStageMap .size () > 0 ) {
265+ if (hovered && item->m_vpStageMap .size () > 0 && Config::DevTitle == EDevTitleMenu::Custom ) {
239266 ImDrawList* draw_list = ImGui::GetForegroundDrawList ();
240267 const ImVec2 mouse_pos = GetMousePos ();
241268 const float font_size = ImGui::GetFontSize ();
@@ -316,10 +343,12 @@ static void DrawStageMapSelector()
316343 current_y += line_height + line_spacing;
317344 }
318345 }
319-
320-
346+
347+
321348 }
322349
350+ // Do not draw mouse, if not custom
351+ if (Config::DevTitle != EDevTitleMenu::Custom) return ;
323352 // Draw mouse position indicator
324353 const float dot_radius = 7 .5f ;
325354 const ImU32 dot_color = IM_COL32 (0 , 150 , 255 , 220 );
@@ -506,7 +535,7 @@ void DevTitleMenu::Draw()
506535 if (!App::s_pApp->m_pDoc ->m_pDocMode )
507536 return ;
508537
509- if (!EmbeddedPlayer::s_isActive)
538+ if (!EmbeddedPlayer::s_isActive && Config::DevTitle == EDevTitleMenu::Custom )
510539 EmbeddedPlayer::Init ();
511540
512541 auto vft = App::s_pApp->m_pDoc ->GetDocMode <Sonicteam::SoX::Engine::Task::Object>()->m_pVftable .ptr .get ();
0 commit comments