New Theme API
NumPad
UI7 Color Selector
Color 2 Hex
UI7 New Draw API (DrawCmd)
UI7 New Debug API (DrawCmd)
Add ThemeEditor Base
This commit is contained in:
2024-06-05 12:32:51 +02:00
parent cbfb0b128c
commit 0626231b45
17 changed files with 756 additions and 349 deletions

View File

@@ -65,22 +65,23 @@ void ProcessMessages() {
200 - (float(msg_lst[i]->animationframe - fade_outs) / fol) * 200;
}
// Wtf is this function lol
RenderD7::CustomizeColor(RD7Color_MessageBackground,
RenderD7::Color::RGBA(RD7Color_MessageBackground)
.changeA(new_alpha)
.toRGBA());
RenderD7::CustomizeColor(
RenderD7::ThemeActive()->Set(
RD7Color_MessageBackground,
RenderD7::Color::RGBA(RD7Color_MessageBackground)
.changeA(new_alpha)
.toRGBA());
RenderD7::ThemeActive()->Set(
RD7Color_Text,
RenderD7::Color::RGBA(RD7Color_Text2).changeA(new_alpha).toRGBA());
RenderD7::Draw2::RFS(pos, R7Vec2(150, 50),
RenderD7::StyleColor(RD7Color_MessageBackground));
RenderD7::Draw2::RFS(
pos, R7Vec2(150, 50),
RenderD7::ThemeActive()->Get(RD7Color_MessageBackground));
RenderD7::Draw2::Text(pos + R7Vec2(5, 1), msg_lst[i]->title);
RenderD7::Draw2::Text(pos + R7Vec2(5, 17), msg_lst[i]->message);
if (rd7_debugging)
RenderD7::Draw2::Text(pos + R7Vec2(155, 1),
std::to_string(msg_lst[i]->animationframe));
RenderD7::UndoColorEdit(RD7Color_Text);
RenderD7::UndoColorEdit(RD7Color_MessageBackground);
RenderD7::ThemeActive()->UndoAll();
// Why Frameadd? because Message uses int as frame and
// It seems that lower 0.5 will be rounded to 0
// Why not replace int with float ?