diff --git a/src/work-calendar.cpp b/src/work-calendar.cpp index 0f72751..38ee1da 100644 --- a/src/work-calendar.cpp +++ b/src/work-calendar.cpp @@ -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(){ @@ -71,8 +72,6 @@ void per_frame(){ if(ImGui::BeginTable("Calendar", 2, ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoHostExtendX)) { ImGui::TableNextRow(); ImGui::TableSetColumnIndex(0); - - year = get_current_year(); ImGui::BeginGroup(); if (ImGui::ArrowButton("##left", ImGuiDir_Left)) @@ -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(); }