private void cmbxBGImage_SelectedIndexChanged(object sender, EventArgs e)
        {
            BGs.Clear();

            Background newBG = new Background();
            SpriteLoader loader = new SpriteLoader();

            textures.Add(cmbxBGImage.Text, loader.loadImage(project.Resources[cmbxBGImage.Text], newBG, true));
            newBG.TextureID = textures[cmbxBGImage.Text];
            BGs.Add(newBG);

            // Redraw so user can see selected object
            glRoomView.Invalidate();
            glRoomView.Update();
        }
        // Function to load a texture for a given gameobject
        private Sprite loadSprite(string obj, string sprPath)
        {
            // Create a helper object so we can access the sprite loading functions
            SpriteLoader loader = new SpriteLoader();

            // Create a new sprite object
            Sprite spr = new Sprite();

            // Using the passed object's name as a key
            textures.Add(obj, loader.loadImage(sprPath, spr));
            spr.TextureID = textures[obj];
            texSizes.Add(obj, new Vector2(spr.Width, spr.Height));

            return spr;
        }