Skip to content

Commit bea175f

Browse files
committed
Fix ImGui default layout and update ROM credits
1 parent f8559d0 commit bea175f

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You can launch the emulator in two ways:
4343
## ROMs
4444
You can download test ROMs and game ROMs to play from the links below:
4545
- **Test ROMs:** [c-sp/game-boy-test-roms](https://github.com/c-sp/game-boy-test-roms)
46-
- **Game ROMs:** [Google Drive Collection](https://drive.google.com/drive/folders/1JgnLjNZpI0l10GN4OGHr47ceT9yhh4UT)
46+
- **Game ROMs:** [Google Drive Collection](https://drive.google.com/drive/folders/1JgnLjNZpI0l10GN4OGHr47ceT9yhh4UT) *(Note: This collection is provided and hosted by **theretrogamesite**, not by me. Please adhere to their terms and conditions.)*
4747

4848
## Tech Stack
4949
- **C++20**

src/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ int main(int argc, char* argv[]) {
300300
}
301301

302302
// 2. ROM Browser Window
303+
ImGui::SetNextWindowPos(ImVec2(10, 30), ImGuiCond_FirstUseEver);
304+
ImGui::SetNextWindowSize(ImVec2(320, 400), ImGuiCond_FirstUseEver);
303305
ImGui::Begin("ROM Browser", nullptr, ImGuiWindowFlags_MenuBar);
304306
{
305307
ImGui::Text("Current Directory:");
@@ -351,6 +353,8 @@ int main(int argc, char* argv[]) {
351353
ImGui::End();
352354

353355
// 3. GameBoy Display Window
356+
ImGui::SetNextWindowPos(ImVec2(340, 30), ImGuiCond_FirstUseEver);
357+
ImGui::SetNextWindowSize(ImVec2(600, 550), ImGuiCond_FirstUseEver);
354358
ImGui::Begin("Display", nullptr, ImGuiWindowFlags_NoScrollbar);
355359
{
356360
ImGui::Text("Loaded: %s", selected_rom_info.c_str());
@@ -387,6 +391,8 @@ int main(int argc, char* argv[]) {
387391
ImGui::End();
388392

389393
// 4. Settings Panel (Audio & Controller & Hardware Quirks)
394+
ImGui::SetNextWindowPos(ImVec2(950, 30), ImGuiCond_FirstUseEver);
395+
ImGui::SetNextWindowSize(ImVec2(320, 750), ImGuiCond_FirstUseEver);
390396
ImGui::Begin("Settings & Controls");
391397
{
392398
if (ImGui::CollapsingHeader("Emulation Controls", ImGuiTreeNodeFlags_DefaultOpen)) {
@@ -453,6 +459,8 @@ int main(int argc, char* argv[]) {
453459

454460
// 5. Serial Log / Test Console
455461
if (debug_mode) {
462+
ImGui::SetNextWindowPos(ImVec2(340, 590), ImGuiCond_FirstUseEver);
463+
ImGui::SetNextWindowSize(ImVec2(600, 190), ImGuiCond_FirstUseEver);
456464
ImGui::Begin("Serial Output Console");
457465
{
458466
if (ImGui::Button("Clear Log")) serial_log_buffer.clear();
@@ -472,6 +480,8 @@ int main(int argc, char* argv[]) {
472480

473481
// 6. CPU Debugger Panel
474482
if (debug_mode) {
483+
ImGui::SetNextWindowPos(ImVec2(10, 440), ImGuiCond_FirstUseEver);
484+
ImGui::SetNextWindowSize(ImVec2(320, 340), ImGuiCond_FirstUseEver);
475485
ImGui::Begin("CPU Registers & Flags");
476486
{
477487
const auto& r = system.get_cpu().get_registers();

0 commit comments

Comments
 (0)