Skip to content

Commit

Permalink
show project name on as title on project screen
Browse files Browse the repository at this point in the history
  • Loading branch information
maks committed Dec 20, 2024
1 parent 4df59b8 commit 19c4985
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sources/Application/Views/ProjectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,15 @@ void ProjectView::DrawView() {
GUITextProperties props;
GUIPoint pos = GetTitlePosition();

SetColor(CD_NORMAL);

// Draw title
char projectString[SCREEN_WIDTH + 1];
npf_snprintf(projectString, sizeof(projectString), "Project - Build %s%s_%s",
PROJECT_NUMBER, PROJECT_RELEASE, BUILD_COUNT);
const char *title = "Project ";
DrawString(pos._x, pos._y, title, props);

SetColor(CD_NORMAL);
DrawString(pos._x, pos._y, projectString, props);
Variable *v = viewData_->project_->FindVariable(FourCC::VarProjectName);
etl::string<MAX_PROJECT_NAME_LENGTH> projectName = v->GetString();
DrawString(pos._x + strlen(title), pos._y, projectName.c_str(), props);

drawBattery(props);

Expand Down

0 comments on commit 19c4985

Please sign in to comment.