add fix and first changes for legend

#3 #6
This commit is contained in:
Ammerhai 2025-08-23 13:44:11 +02:00
parent ccf34d2aa9
commit 0dd68bea8a

View File

@ -46,6 +46,7 @@ int days_per_month(int year, int month){
void init(){
ImGuiIO &io = ImGui::GetIO();
io.Fonts->AddFontFromMemoryCompressedTTF(inter_compressed_data, inter_compressed_size);
year = get_current_year();
}
void per_frame(){
@ -72,8 +73,6 @@ void per_frame(){
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
year = get_current_year();
ImGui::BeginGroup();
if (ImGui::ArrowButton("##left", ImGuiDir_Left))
year--;
@ -86,6 +85,10 @@ void per_frame(){
ImGui::TextAligned(0.5, -FLT_MIN, "%d", year);
ImGui::EndGroup();
ImGui::TableSetColumnIndex(1);
ImGui::TextAligned(0.5, -FLT_MIN, "Legende");
//
ImGui::TableNextRow();
ImGui::TableSetColumnIndex(0);
@ -194,6 +197,16 @@ void per_frame(){
ImGui::PopID();
}
//Legende
ImGui::TableSetColumnIndex(1);
ImVec4 col;
ImGui::ColorButton("colortest", col);
ImGui::SameLine(0, 0);
char buf[64];
ImGui::InputText("", buf, IM_ARRAYSIZE(buf));
//TODO
//calendar table
ImGui::EndTable();
}