The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Public Attributes | List of all members
sub_achievement Struct Reference

Represents a distinct sub-achievement within another achievement. More...

#include <achievements.hpp>

Public Member Functions

 sub_achievement (const config &cfg, bool achieved)
 

Public Attributes

std::string id_
 The ID of the sub-achievement. More...
 
t_string description_
 The description of the sub-achievement to be shown in its tooltip. More...
 
std::string icon_
 The icon of the sub-achievement to show on the UI when not completed. More...
 
std::string icon_completed_
 The icon of the sub-achievement to show on the UI when completed. More...
 
bool achieved_
 Whether the sub-achievement has been completed. More...
 

Detailed Description

Represents a distinct sub-achievement within another achievement.

This is intentionally a much simpler object than the regular achievements.

Definition at line 28 of file achievements.hpp.

Constructor & Destructor Documentation

◆ sub_achievement()

sub_achievement::sub_achievement ( const config cfg,
bool  achieved 
)

Definition at line 27 of file achievements.cpp.

Member Data Documentation

◆ achieved_

bool sub_achievement::achieved_

Whether the sub-achievement has been completed.

Definition at line 39 of file achievements.hpp.

Referenced by game_lua_kernel::intf_set_sub_achievement(), and gui2::dialogs::achievements_dialog::set_sub_achievements().

◆ description_

t_string sub_achievement::description_

The description of the sub-achievement to be shown in its tooltip.

Definition at line 33 of file achievements.hpp.

Referenced by gui2::dialogs::achievements_dialog::set_sub_achievements().

◆ icon_

std::string sub_achievement::icon_

The icon of the sub-achievement to show on the UI when not completed.

Definition at line 35 of file achievements.hpp.

Referenced by gui2::dialogs::achievements_dialog::set_sub_achievements().

◆ icon_completed_

std::string sub_achievement::icon_completed_

The icon of the sub-achievement to show on the UI when completed.

Definition at line 37 of file achievements.hpp.

Referenced by gui2::dialogs::achievements_dialog::set_sub_achievements().

◆ id_

std::string sub_achievement::id_

The ID of the sub-achievement.

Must be unique per achievement

Definition at line 31 of file achievements.hpp.

Referenced by game_lua_kernel::intf_set_sub_achievement().


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