'<function-style-cast>': cannot convert from 'const char [1]' to 'Menu' C++

  • Thread starter Thread starter lawenCc
  • Start date Start date
L

lawenCc

Guest
When i try to create an option using a 'function' i created inside the class i get function style cast error, i know its something basic that im forgetting. any help would be appreciated.

Ive included the 'function' part of the class below, RGBA is a struct incase it matters at all.


#define MainXcoord 1080/2
class Menu {
private:
char* passedtext;
float color[4];
public:
Menu(char* text, RGBA color_ = { Base.OptionColor.r, Base.OptionColor.g, Base.OptionColor.b, 255 }) {
passedtext = text;
color[0] = (float)color_.r / 255.0f;
color[1] = (float)color_.g / 255.0f;
color[2] = (float)color_.b / 255.0f;
color[3] = (float)color_.a / 255.0f;
}

Menu Title() { float Color[4] = { (float)Base.TitleColor.r / 255.0f,(float)Base.TitleColor.g / 255.0f,(float)Base.TitleColor.b / 255.0f,(float)255 / 255.0f };Function::drawtext(passedtext, 0x7FFFFFFF, Function::R_RegisterFont("fonts/normalFont", 1), MainXcoord + Base.MenuBaseXcoord, 150, 1, 1, 0, Color, 0);

return *this;

}



Menu("title menu text").Title();
Menu("Submenu").Sub(Sub1);

Continue reading...
 
Back
Top