almost finishing theming support

This commit is contained in:
kin fuyuki 2026-02-20 07:55:55 -03:00
commit 3932589790
No known key found for this signature in database
GPG key ID: 0E4E8E519FB71401
8 changed files with 181 additions and 61 deletions

View file

@ -187,7 +187,7 @@ namespace enginend{
}
};
struct button :virtual public tinted{
void(*func)();
std::function<void()> func;
bool pressed;
bool hover;
const bool isboolean;
@ -214,14 +214,14 @@ namespace enginend{
}else{
pressed=false;
c=isboolean?boolean?
this->theme->booleanbutton[4]:this->theme->button[1]:
this->theme->booleanbutton[4]:this->theme->booleanbutton[1]:
this->theme->button[1];
}
}else{
hover=false;
pressed=false;
c=isboolean?boolean?
this->theme->booleanbutton[3]:this->theme->button[0]:
this->theme->booleanbutton[3]:this->theme->booleanbutton[0]:
this->theme->button[0];
}
}
@ -270,13 +270,13 @@ namespace enginend{
this->theme->buttontext[2];
}else {
txc=isboolean?boolean?
this->theme->booleantext[4]:this->theme->buttontext[1]:
this->theme->button[1];
this->theme->booleantext[4]:this->theme->booleantext[1]:
this->theme->buttontext[1];
}
}else {
txc=isboolean?boolean?
this->theme->booleantext[3]:this->theme->button[0]:
this->theme->button[0];
this->theme->booleantext[3]:this->theme->booleantext[0]:
this->theme->buttontext[0];
}
DrawTextEx(this->theme->font,label.c_str(),tpos,fs,1,txc);
}