From 25ce3901c49263652ae2368a438091484dc28fce Mon Sep 17 00:00:00 2001 From: nexus4880 <38168516+nexus4880@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:02:43 -0700 Subject: [PATCH] Added drag and drop check to load .gb files --- src/GUI/GUI.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/GUI/GUI.cs b/src/GUI/GUI.cs index a75cfb1..d0f82f0 100644 --- a/src/GUI/GUI.cs +++ b/src/GUI/GUI.cs @@ -27,6 +27,17 @@ public void Run() { Raylib.ClearBackground(Color.DarkGray); rlImGui.Begin(); + if (Raylib.IsFileDropped()) { + string[] files = Raylib.GetDroppedFiles(); + foreach (string file in files) { + FileInfo fileInfo = new FileInfo(file); + if (fileInfo.Extension == ".gb") { + Helper.rom = file; + insertingRom = true; + } + } + } + if (insertingRom) { dmg = new DMG(Helper.rom, Helper.bootrom); debug = new Debug(dmg);