Forums
Draw2D() in menu.cpp and utility.cpp - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: Draw2D() in menu.cpp and utility.cpp (/showthread.php?tid=156)



Draw2D() in menu.cpp and utility.cpp - thelusiv - 11-26-2005

Just out of curiosity, why is there a Draw2D function in menu.cpp? It seems to be exactly the same as the one in utility.cpp except for two lines. Is there a particular reason to have that function besides convenience of calling a local function instead of something in utility?


Draw2D() in menu.cpp and utility.cpp - joevenzon - 11-27-2005

Originally, Draw2D was a function I wrote for use by the menu class. I later realized that it was a useful function for other classes too, so I added it to the utility class so I only have to have the function in one place. I guess I forgot to completely remove it from menu.cpp....


Draw2D() in menu.cpp and utility.cpp - thelusiv - 11-30-2005

Well, I guess the original Draw2D function will be gone anyway when the new Gui class replaces the MENU class. I was just wondering if I needed to duplicate this function somehow in Gui, I didn't think I did.