Quantcast

Jump to content

» «
Photo

Changing menu x position using float Option

2 replies to this topic
DoggoMaster
  • DoggoMaster

    Player Hater

  • Members
  • Joined: 18 Sep 2017
  • Poland

#1

Posted 2 weeks ago

I want to create changing menu x position using float Option, likes d3sk1ng its examples (isnt working):

 

if (Menu::Float("MenuX Position", Bool::menuxposition, 0.15f, 0.84f)) { Menu::Settings::menuX == Bool::menuxposition; }

 

if (Menu::Float("testtsettest", Bool::testx, 0.15f, 0.84f)) { Menu::Settings::menuX = Bool::testx; }

 

Menu::Float("test", Menu::Settings::menuX, 0.17f, 0.84f);

 

or something like thats, thanks for help!


de_Tylmarande
  • de_Tylmarande

    Player Hater

  • New Members
  • Joined: A week ago
  • Ukraine

#2

Posted A week ago Edited by de_Tylmarande, A week ago.

if (Menu::Float("MenuX Position", Bool::menuxposition, 0.15f, 0.84f)) { Menu::Settings::menuX == Bool::menuxposition; }

 
What is this? You're trying to pass float value to bool? Why?
 
This should be work fine:
 

if (Menu::Float("test", Menu::Settings::menuX, 0.17f, 0.84f));

 
But in some case you need to handle KeyPressm so you need to use something like this:
 

if (Menu::Float("test", Menu::Settings::menuX, 0.17f, 0.84f)) { Menu::Settings::menuX = NumberKeyboard() }

DoggoMaster
  • DoggoMaster

    Player Hater

  • Members
  • Joined: 18 Sep 2017
  • Poland

#3

Posted A week ago

@de_Tylmarande i used namespace Bool { float menuxposition = 0.17f; } 





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users