305 ImVec2 win_pos = ImGui::GetWindowPos();
306 ImVec2 win_size = ImGui::GetContentRegionMax();
308 ImVec2 padding = ImGui::GetStyle().WindowPadding;
316 cur_pos = ImGui::GetCursorPos();
317 ImVec2 usr_center(win_pos.x + cur_pos.x + radius, win_pos.y + cur_pos.y + (radius / 2));
321 ImGui::SetCursorPosX(padding.x + (radius * 2) + padding.x);
322 ImGui::Text(usr_buff);
325 time_t now = time(0);
326 tm *ltm = localtime(&now);
328 sprintf(time,
"%.2d:%.2d:%.2d", ltm->tm_hour, ltm->tm_min, ltm->tm_sec);
329 ImVec2 tts = ImGui::CalcTextSize(time);
331 float time_x = win_size.x - padding.x - tts.x - 2;
332 ImGui::SetCursorPosX(time_x);
339 ImGui::SetCursorPosX(time_x - 100);
340 ImGui::TextColored(ImColor(IM_COL32(0, 180, 0, 255)),
"%d", scr_mgr->
get_selected_screen());
#define DEF_BUFF_SIZE_V_SMALL
bool has_user()
Checks if user is logged in. This is determined by user_space being initialized and having the user_l...
screen_manager * get_scr_mgr()
Get the screen manager instance. This instance is kind of singleton. Is initalized only once on start...
bool user_logged
Flag to indicate if a user is logged in.
std::unique_ptr< user_workspace > userspace
User's workspace. Serves similar function as app_workspace but for user data.
uint8_t get_selected_screen()
void draw_status_circle(ImVec2 center, bool usr_logged, float radius)