game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
HowLongToBeatInfo Struct Reference

Time-to-beat estimates from HowLongToBeat.com. More...

#include <game.h>

Public Member Functions

bool isStale () const
 Check if data is stale (older than 30 days).

Static Public Member Functions

static std::string formatHours (double hours)
 Get formatted time string for a playstyle.

Public Attributes

double allStylesHours = 0.0
 Average across all playstyles.
double completionistHours = 0.0
 100% completion
bool found = false
 Whether a match was found.
int hltbId = 0
 HowLongToBeat game ID.
time_t lastUpdated = 0
 When this data was fetched.
double mainPlusExtrasHours = 0.0
 Main + side content.
double mainStoryHours = 0.0
 Main story/campaign only.
std::string matchedName
 Name matched on HLTB.

Detailed Description

Time-to-beat estimates from HowLongToBeat.com.

Provides completion time estimates for planning play sessions.

Definition at line 671 of file game.h.

Member Function Documentation

◆ formatHours()

std::string HowLongToBeatInfo::formatHours ( double hours)
static

Get formatted time string for a playstyle.

Parameters
hoursTime in hours
Returns
Formatted string like "25h" or "120h"

Definition at line 429 of file game.cpp.

◆ isStale()

bool HowLongToBeatInfo::isStale ( ) const

Check if data is stale (older than 30 days).

Definition at line 419 of file game.cpp.

References lastUpdated.

Member Data Documentation

◆ allStylesHours

double HowLongToBeatInfo::allStylesHours = 0.0

Average across all playstyles.

Definition at line 680 of file game.h.

◆ completionistHours

double HowLongToBeatInfo::completionistHours = 0.0

100% completion

Definition at line 679 of file game.h.

Referenced by DetailsPanelManager::Impl::update().

◆ found

bool HowLongToBeatInfo::found = false

Whether a match was found.

Definition at line 684 of file game.h.

Referenced by HLTBService::getGameInfo(), HLTBService::getGameInfoById(), and DetailsPanelManager::Impl::update().

◆ hltbId

int HowLongToBeatInfo::hltbId = 0

HowLongToBeat game ID.

Definition at line 673 of file game.h.

◆ lastUpdated

time_t HowLongToBeatInfo::lastUpdated = 0

When this data was fetched.

Definition at line 683 of file game.h.

Referenced by isStale().

◆ mainPlusExtrasHours

double HowLongToBeatInfo::mainPlusExtrasHours = 0.0

Main + side content.

Definition at line 678 of file game.h.

Referenced by DetailsPanelManager::Impl::update().

◆ mainStoryHours

double HowLongToBeatInfo::mainStoryHours = 0.0

Main story/campaign only.

Definition at line 677 of file game.h.

Referenced by DetailsPanelManager::Impl::update().

◆ matchedName

std::string HowLongToBeatInfo::matchedName

Name matched on HLTB.

Definition at line 674 of file game.h.


The documentation for this struct was generated from the following files: