Advertisement
Benjamin_Loison

void initializeGui() and void setGuiScreen(string gui)

Aug 6th, 2017
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. string actualGui = "";
  2.  
  3. void initializeGui()
  4. {
  5.     guiMainMenu = GuiMainMenu();
  6.     guiMainMenuPtr = &guiMainMenu;
  7.  
  8.     guiGame = GuiGame();
  9.     guiGamePtr = &guiGame;
  10.  
  11.     setGuiScreen("GuiMainMenu");
  12. }
  13.  
  14. void setGuiScreen(string gui)
  15. {
  16.     actualGui = gui;
  17.     if(actualGui == "GuiGame")
  18.         guiScreenPtr = guiGamePtr;
  19.     else if(actualGui == "GuiMainMenu")
  20.         guiScreenPtr = guiMainMenuPtr;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement