Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 7th, 2020 155 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void Setup::CreatePlayerInterface()
  2. {
  3.     sf::Vector2f SetupWindowSize;
  4.  
  5.     tgui::ChildWindow::Ptr SetupWindow = Creators::CreateChildWindow
  6.     (
  7.         Getters::getCenterScale({250, 300}),
  8.         Getters::getScale({250, 300}),
  9.         "Player Setup"
  10.     );
  11.     CentralGui.add(SetupWindow);
  12.     SetupWindowSize = SetupWindow->getSize();
  13.    
  14.     tgui::Label::Ptr PosLabel = Creators::CreateLabel
  15.     (
  16.         Getters::getScale({25, 25}, SetupWindowSize),
  17.         20, "Player Position"
  18.     );
  19.     SetupWindow->add(PosLabel);
  20.  
  21.     tgui::EditBox::Ptr PosX = Creators::CreateEditBox
  22.     (
  23.         Getters::getScale({25, 50}, SetupWindowSize),
  24.         Getters::getScale({75, 25}, SetupWindowSize), "X",
  25.         Signals::EditBox::TextChanged,
  26.         PlayerInfoTemp.Position.x
  27.     );
  28.     SetupWindow->add(PosX);
  29.  
  30.     tgui::EditBox::Ptr PosY = Creators::CreateEditBox
  31.     (
  32.         Getters::getScale({150, 50}, SetupWindowSize),
  33.         Getters::getScale({75, 25}, SetupWindowSize), "Y",
  34.         Signals::EditBox::TextChanged,
  35.         PlayerInfoTemp.Position.y
  36.     );
  37.     SetupWindow->add(PosY);
  38.  
  39.     tgui::Label::Ptr SizeLabel = Creators::CreateLabel
  40.     (
  41.         Getters::getScale({25, 100}, SetupWindowSize),
  42.         20, "Player Size"
  43.     );
  44.     SetupWindow->add(SizeLabel);
  45.  
  46.     tgui::EditBox::Ptr SizeX = Creators::CreateEditBox
  47.     (
  48.         Getters::getScale({25, 125}, SetupWindowSize),
  49.         Getters::getScale({75, 25}, SetupWindowSize), "X",
  50.         Signals::EditBox::TextChanged,
  51.         PlayerInfoTemp.Size.x
  52.     );
  53.     SetupWindow->add(SizeX);
  54.  
  55.     tgui::EditBox::Ptr SizeY = Creators::CreateEditBox
  56.     (
  57.         Getters::getScale({150, 125}, SetupWindowSize),
  58.         Getters::getScale({75, 25}, SetupWindowSize), "Y",
  59.         Signals::EditBox::TextChanged,
  60.         PlayerInfoTemp.Size.y
  61.     );
  62.     SetupWindow->add(SizeY);
  63.  
  64.     tgui::Label::Ptr FileLabel = Creators::CreateLabel
  65.     (
  66.         Getters::getScale({25, 175}, SetupWindowSize),
  67.         20, "Texture Filename"
  68.     );
  69.     SetupWindow->add(FileLabel);
  70.  
  71.     tgui::EditBox::Ptr TextureFilename = Creators::CreateEditBox
  72.     (
  73.         Getters::getScale({25, 200}, SetupWindowSize),
  74.         Getters::getScale({200, 25}, SetupWindowSize),
  75.         "File Path", Signals::EditBox::TextChanged,
  76.         PlayerInfoTemp.TextureFilename
  77.     );
  78.     SetupWindow->add(TextureFilename);
  79.  
  80.     tgui::Button::Ptr CreatePlayer = Creators::CreateButton
  81.     (
  82.         Getters::getScale({75, 245}, SetupWindowSize),
  83.         Getters::getScale({100, 35}, SetupWindowSize),
  84.         "Create", Signals::Button::Pressed,
  85.         Informations.SetPlayer,
  86.         std::ref(PlayerInfoTemp)
  87.     );
  88.     SetupWindow->add(CreatePlayer);
  89. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top