The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
preferences_list.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2024 - 2025
3 Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY.
11
12 See the COPYING file for more details.
13*/
14
15#pragma once
16
17#include "enum_base.hpp"
18
19#define ADDPREF(pref) static constexpr const char* const pref = #pref;
20
21/**
22 * Contains all valid preferences attributes.
23 */
25{
26 //
27 // regular preferences
28 //
29 /** wesnoth version string when cache files were last deleted */
30 ADDPREF(_last_cache_cleaned_ver)
31 /** achievements completed for add-ons/UMC, are not steam achievements */
33 /** player names marked as either friends or as ignored */
34 ADDPREF(acquaintance)
35 /** whether to get the add-on icons when downloading the add-ons list */
36 ADDPREF(addon_icons)
37 /** the sort direction, ie: ascending */
38 ADDPREF(addon_manager_saved_order_direction)
39 /** the name of the column in the add-ons manager to use by default to sort results */
40 ADDPREF(addon_manager_saved_order_name)
41 /** set an alternate way to call a command, similar to linux terminal command aliases */
42 ADDPREF(alias)
43 /** whether a game should allow observers */
44 ADDPREF(allow_observers)
45 /** the orb color above allied units */
46 ADDPREF(ally_orb_color)
47 /** whether to stop movement of a unit when an allied unit comes into sight range */
48 ADDPREF(ally_sighted_interrupts)
49 /** whether to display animations on terrain (ie: windmill) */
50 ADDPREF(animate_map)
51 /** whether to animate water terrain */
52 ADDPREF(animate_water)
53 /** whether to automatically set the pixel scale multiplier based on the current window size */
54 ADDPREF(auto_pixel_scale)
55 /** the maximum number of autosaves to keep before deleting old ones */
56 ADDPREF(auto_save_max)
57 /** how loud the turn bell sound is */
58 ADDPREF(bell_volume)
59 /** whether to show the map before being given a side in online multiplayer */
60 ADDPREF(blindfold_replay)
61 /** the most recently selected RNG mode in the campaign selection dialog */
62 ADDPREF(campaign_rng_mode)
63 /** the add-ons server name, ie: add-ons.wesnoth.org */
64 ADDPREF(campaign_server)
65 /** the number of lines of chat to display in-game */
66 ADDPREF(chat_lines)
67 /** whether to show a timestamp in in-game chat messages */
68 ADDPREF(chat_timestamp)
69 /** child tag name for completed campaign information */
70 ADDPREF(completed_campaigns)
71 /** whether to confirm ending your turn when units can still take action */
72 ADDPREF(confirm_end_turn)
73 /** the current core to use */
74 ADDPREF(core)
75 /**
76 * creates a single command composed of one or more other commands
77 * format - :custom show_terrain_codes;show_num_of_bitmaps
78 */
79 ADDPREF(custom_command)
80 /** whether to show a confirmation dialog when deleting a save */
81 ADDPREF(delete_saves)
82 /** additional folders shown when using the file selection dialog */
83 ADDPREF(dir_bookmarks)
84 /** whether to automatically move units that were previously told to move towards hexes more than one turn away */
85 ADDPREF(disable_auto_moves)
86 /** maximum FPS, if set, at which to refresh the screen */
87 ADDPREF(refresh_rate)
88 /** whether to have the editor automatically update terrain transitions when placing terrain immediately, after the mouse click is released, or not at all */
89 ADDPREF(editor_auto_update_transitions)
90 /** the current add-on being used in the editor */
91 ADDPREF(editor_chosen_addon)
92 /** whether to draw the x,y map coordinates in the editor */
93 ADDPREF(editor_draw_hex_coordinates)
94 /** number of images used to draw the hex */
95 ADDPREF(editor_draw_num_of_bitmaps)
96 /** whether to draw terrain codes on hexes in the editor */
97 ADDPREF(editor_draw_terrain_codes)
98 /** list of recently accessed files in the editor */
99 ADDPREF(editor_recent_files)
100 /** whether to display the active tool information help text at the bottom/top of the editor */
101 ADDPREF(editor_help_text_shown)
102 /** whether to automatically start in planning mode in-game */
103 ADDPREF(enable_planning_mode_on_start)
104 /** list of terrain seen so far */
105 ADDPREF(encountered_terrain_list)
106 /** list of units seen so far */
107 ADDPREF(encountered_units)
108 /** the color of the orb over enemy units */
109 ADDPREF(enemy_orb_color)
110 /** in the multiplayer lobby, show games with blocked players in them */
111 ADDPREF(fi_blocked_in_game)
112 /** in the multiplayer lobby, show games with friends in them */
113 ADDPREF(fi_friends_in_game)
114 /** in the multiplayer lobby, invert all other filters */
115 ADDPREF(fi_invert)
116 /** in the multiplayer lobby, show games with vacant slots */
117 ADDPREF(fi_vacant_slots)
118 /** whether to show floating labels on the game map */
119 ADDPREF(floating_labels)
120 /** whether to use fullscreen mode */
121 ADDPREF(fullscreen)
122 /** saved options for game creation */
123 ADDPREF(game_preset)
124 /** whether to show a hex grid overlay on the map */
125 ADDPREF(grid)
126 /** the gui2 theme name */
127 ADDPREF(gui2_theme)
128 /** whether to show teammate's whiteboard plans on the game map */
129 ADDPREF(hide_whiteboard)
130 /** list of lines of text entered into textboxes that support keeping a history */
131 ADDPREF(history)
132 /** the most recent multiplayer server hostname */
133 ADDPREF(host)
134 /** changed hotkeys */
136 /** whether to play idle animations */
137 ADDPREF(idle_anim)
138 /** how frequently to play idle animations */
139 ADDPREF(idle_anim_rate)
140 /** who to show notifications about when they join the multiplayer lobby */
141 ADDPREF(lobby_joins)
142 /** whether to only accept whisper messages from friends */
143 ADDPREF(lobby_whisper_friends_only)
144 /** player chosen language to use */
145 ADDPREF(locale)
146 /** most recently use username for logging into the multiplayer server */
147 ADDPREF(login)
148 /** whether the window is maximized */
149 ADDPREF(maximized)
150 /** whether to play a sound when receiving a message */
151 ADDPREF(message_bell)
152 /** whether to draw terrain in the in-game minimap */
153 ADDPREF(minimap_draw_terrain)
154 /** whether to draw units on in-game/editor minimap */
155 ADDPREF(minimap_draw_units)
156 /** whether to draw villages on the in-game/editor minimap */
157 ADDPREF(minimap_draw_villages)
158 /**
159 * on the in-game minimap/editor minimap use a color for your side, a color for all allied sides, and a color for all enemy sides
160 * doesn't actually have anything to do with movement
161 */
162 ADDPREF(minimap_movement_coding)
163 /** simplified color coding by terrain type in the in-game minimap/editor */
164 ADDPREF(minimap_terrain_coding)
165 /** the color of the orb above a unit that can no longer move */
166 ADDPREF(moved_orb_color)
167 /** whether to enable the turn timer in multiplayer */
168 ADDPREF(mp_countdown)
169 /** seconds to add to the multiplayer turn timer when an action is taken */
170 ADDPREF(mp_countdown_action_bonus)
171 /** seconds for the multiplayer turn timer for each player's first turn */
172 ADDPREF(mp_countdown_init_time)
173 /** maximum seconds the multiplayer turn timer can have for a single turn */
174 ADDPREF(mp_countdown_reservoir_time)
175 /** bonus seconds for the multiplayer turn timer for turns after turn 1 */
176 ADDPREF(mp_countdown_turn_bonus)
177 /** the most recently played era in multiplayer */
178 ADDPREF(mp_era)
179 /** whether to enable fog in multiplayer games */
180 ADDPREF(mp_fog)
181 /** the id of the most recently played multiplayer scenario */
182 ADDPREF(mp_level)
183 /** most recently selected type of game: scenario, campaign, random map, etc */
184 ADDPREF(mp_level_type)
185 /** most recently selected mp playing mode/connection type */
186 ADDPREF(mp_connect_type)
187 /** list of the last selected multiplayer modifications */
188 ADDPREF(mp_modifications)
189 /** whether to use a random start time for the scenario */
190 ADDPREF(mp_random_start_time)
191 /** the name of the wesnothd executable */
192 ADDPREF(mp_server_program_name)
193 /** whether to show a warning dialog about starting wesnothd in the background when hosting LAN games */
194 ADDPREF(mp_server_warning_disabled)
195 /** whether to enable shroud in multiplayer games */
196 ADDPREF(mp_shroud)
197 /** the turn limit for multiplayer games */
198 ADDPREF(mp_turns)
199 /** whether to use the scenario's default settings */
200 ADDPREF(mp_use_map_settings)
201 /** the amount of gold each village gives */
202 ADDPREF(mp_village_gold)
203 /** the amount of unit upkeep each village offsets */
204 ADDPREF(mp_village_support)
205 /** the multiplier to apply to all units in a multiplayer game */
206 ADDPREF(mp_xp_modifier)
207 /** whether music is enabled */
208 ADDPREF(music)
209 /** the music's volume */
210 ADDPREF(music_volume)
211 /** custom multiplayer scenario options */
212 ADDPREF(options)
213 /** the orb above units with that can still take some actions */
214 ADDPREF(partial_orb_color)
215 /** the pixel scale multiplier to apply */
216 ADDPREF(pixel_scale)
217 /** whether to allow any type of mirrors in a multiplayer scenario */
219 /** whether to remember passwords typed into password fields */
220 ADDPREF(remember_password)
221 /** whether to save replays of games */
222 ADDPREF(save_replays)
223 /** the scroll speed */
224 ADDPREF(scroll)
225 /** how close the mouse needs to get to the edge of the screen to start scrolling */
226 ADDPREF(scroll_threshold)
227 /** the most recently selected achievement group in the achievements dialog */
228 ADDPREF(selected_achievement_group)
229 /** contains the list of any player-entered multiplayer servers */
230 ADDPREF(server)
231 /** whether to show an orb over allied units */
232 ADDPREF(show_ally_orb)
233 /** whether to show an orb over disengaged units */
234 ADDPREF(show_disengaged_orb)
235 /** whether to show an orb over enemy units */
236 ADDPREF(show_enemy_orb)
237 /** whether to show an orb over units that have used all their actions */
238 ADDPREF(show_moved_orb)
239 /** whether to show an orb over units that have only use some of their actions */
240 ADDPREF(show_partial_orb)
241 /** whether to show the team colored circle under units */
242 ADDPREF(show_side_colors)
243 /** whether to show unit status (moved, unmoved, etc) for allied units as well */
244 ADDPREF(show_status_on_ally_orb)
245 /** whether to show the tips panel on titlescreen */
246 ADDPREF(show_tips)
247 /** whether to show an orb over units that haven't done anything */
248 ADDPREF(show_unmoved_orb)
249 /** whether to randomly assign sides in multiplayer games */
250 ADDPREF(shuffle_sides)
251 /** whether to skip move animations for AI actions */
252 ADDPREF(skip_ai_moves)
253 /** whether to skip animation of all actions when joining an in-progress multiplayer game */
254 ADDPREF(skip_mp_replay)
255 /** whether to play non-UI sounds */
257 /** the volume for playing sounds */
258 ADDPREF(sound_volume)
259 /** list of the last selected single player modifications */
260 ADDPREF(sp_modifications)
261 /** whether to continue playing music when wesnoth isn't the focused window */
262 ADDPREF(stop_music_in_background)
263 /** the ThemeWML theme */
265 /** hex size used to determine zoom level */
266 ADDPREF(tile_size)
267 /** whether to enable accelerated animation speed */
268 ADDPREF(turbo)
269 /** how much to accelerate animation speed */
270 ADDPREF(turbo_speed)
271 /** whether to play a sound when it's your turn */
272 ADDPREF(turn_bell)
273 /** whether to show a dialog and add a blindfold between turns */
274 ADDPREF(turn_dialog)
275 /** whether to play sounds when clicking UI elements */
276 ADDPREF(ui_sound)
277 /** how loud to make the sound when clicking UI elements */
278 ADDPREF(ui_volume)
279 /** whether to show standing animations */
280 ADDPREF(unit_standing_animations)
281 /** the color of the orb over units that haven't done anything */
282 ADDPREF(unmoved_orb_color)
283 /** whether to lock the FPS to the screen refresh rate */
284 ADDPREF(vsync)
285 /** width of the wesnoth window */
286 ADDPREF(xresolution)
287 /** height of the wesnoth window */
288 ADDPREF(yresolution)
289 //
290 // MP alert preferences
291 // Note, this list of items must match those ids defined in data/gui/dialogs/mp_alerts_options.cfg
292 //
293 /** whether to play a sound when a player joins the game you're in */
294 ADDPREF(player_joins_sound)
295 /** whether to show a notification when a player joins the game you're in */
296 ADDPREF(player_joins_notif)
297 /** whether to show the enabled player join sound or notification in the lobby as well */
298 ADDPREF(player_joins_lobby)
299 /** whether to play a sound when a player leaves the game you're in */
300 ADDPREF(player_leaves_sound)
301 /** whether to show a notification when a player leaves the game you're in */
302 ADDPREF(player_leaves_notif)
303 /** whether to show the enabled player leave sound or notification in the lobby as well */
304 ADDPREF(player_leaves_lobby)
305 /** whether to play a sound when receiving a private message aka whisper */
306 ADDPREF(private_message_sound)
307 /** whether to show a notification when receiving a private message aka whisper */
308 ADDPREF(private_message_notif)
309 /** whether to show the enabled private message aka whisper join sound or notification in the lobby as well */
310 ADDPREF(private_message_lobby)
311 /** whether to play a sound when a friend messages you while in game */
312 ADDPREF(friend_message_sound)
313 /** whether to show a notification when a friend messages you while in game */
314 ADDPREF(friend_message_notif)
315 /** whether to show the enabled friend message sound or notification in the lobby as well */
316 ADDPREF(friend_message_lobby)
317 /** whether to play a sound when a public message is sent */
318 ADDPREF(public_message_sound)
319 /** whether to show a notification when a public message is sent */
320 ADDPREF(public_message_notif)
321 /** whether to show the enabled public message sound or notification in the lobby as well */
322 ADDPREF(public_message_lobby)
323 /** whether to play a sound when a server message is sent */
324 ADDPREF(server_message_sound)
325 /** whether to show a notification when a server message is sent */
326 ADDPREF(server_message_notif)
327 /** whether to show the enabled server message sound or notification in the lobby as well */
328 ADDPREF(server_message_lobby)
329 /** opacity of the reach map border, 100 being 100% of the original image opacity, 0 being invisible */
330 ADDPREF(reach_map_border_opacity)
331 /** the color of the reach map */
332 ADDPREF(reach_map_color)
333 /** the color of tile borders of the reach map that are next to an enemy */
334 ADDPREF(reach_map_enemy_color)
335 /** opacity of the reach map tint, 100 being 100% of the original image opacity, 0 being invisible */
336 ADDPREF(reach_map_tint_opacity)
337 /** opacity of the reach map darkening, 100 being 100% of the original image opacity, 0 being invisible */
338 ADDPREF(reach_map_darken_opacity)
339 /** whether to darken unreachable areas with textured or solid black */
340 ADDPREF(reach_map_darken_tex)
341 /** whether to play a sound when the game is ready to be started */
342 ADDPREF(ready_for_start_sound)
343 /** whether to show a notification when the game is ready to be started */
344 ADDPREF(ready_for_start_notif)
345 /** used to make a UI element invisible in the mp alerts options dialog */
346 ADDPREF(ready_for_start_lobby)
347 /** whether to play a sound when the game has started */
348 ADDPREF(game_has_begun_sound)
349 /** whether to show a notification when the game has started */
350 ADDPREF(game_has_begun_notif)
351 /** used to make a UI element invisible in the mp alerts options dialog */
352 ADDPREF(game_has_begun_lobby)
353 /** used to make a UI element invisible in the mp alerts options dialog */
354 ADDPREF(turn_changed_sound)
355 /** whether to show a notification when the turn changes */
356 ADDPREF(turn_changed_notif)
357 /** used to make a UI element invisible in the mp alerts options dialog */
358 ADDPREF(turn_changed_lobby)
359 /** whether to play a sound when a new game is created */
360 ADDPREF(game_created_sound)
361 /** whether to show a notification when a new game is created */
362 ADDPREF(game_created_notif)
363 /** whether to show the new game creation message sound or notification in the lobby as well */
364 ADDPREF(game_created_lobby)
365
366 //
367 // advanced preferences
368 // these are also set via the preferences dialog without using their explicit setter methods
369 //
370 /** whether to show a confirmation dialog for deleting save files */
371 ADDPREF(ask_delete)
372 /** how many minutes to wait before removing chat messages */
373 ADDPREF(chat_message_aging)
374 /** whether to use a color cursor */
375 ADDPREF(color_cursors)
376 /** what compression to use for save files, if any */
377 ADDPREF(compress_saves)
378 /** whether to ask for confirmation when loading a save from a different version of wesnoth */
379 ADDPREF(confirm_load_save_from_different_version)
380 /** whether to use monte carlo instead of exact calculations for fight outcomes */
381 ADDPREF(damage_prediction_allow_monte_carlo_simulation)
382 /** how many recent files to keep a list of */
383 ADDPREF(editor_max_recent_files)
384 /** additional scaling for text on top of the pixel scale multiplier */
385 ADDPREF(font_scale)
386 /** how long to wait before assuming a connection to the multiplayer server has been lost */
387 ADDPREF(keepalive_timeout)
388 /** whether to open a new chat tab in the multiplayer lobby after sending a whisper */
389 ADDPREF(lobby_auto_open_whisper_windows)
390 /** whether holding middle click and moving the mouse will scroll around the map */
391 ADDPREF(middle_click_scrolls)
392 /** whether moving the mouse to the sides of the window scrolls around the map */
393 ADDPREF(mouse_scrolling)
394 /** whether to scroll to a unit when an action is taken */
395 ADDPREF(scroll_to_action)
396 /** keep scrolling when the mouse moves outside the wesnoth window */
397 ADDPREF(scroll_when_mouse_outside)
398 /** whether to show all units in the help rather than only the units encountered so far */
399 ADDPREF(show_all_units_in_help)
400 /** whether to show combat animations */
401 ADDPREF(show_combat)
402 /** whether to show deprecation warnings for WML, lua, etc APIs */
403 ADDPREF(show_deprecation)
404 /** whether to show an indicator above defenders when an attack misses */
405 ADDPREF(show_attack_miss_indicator)
406 /** whether to use SIMD hardware acceleration for pixel operations */
407 ADDPREF(simd_enabled)
408 /** whether to use a 12 hour vs 24 hours clock in various places on the UI */
409 ADDPREF(use_twelve_hour_clock_format)
410
412 _last_cache_cleaned_ver,
414 acquaintance,
415 addon_manager_saved_order_direction,
416 addon_manager_saved_order_name,
417 alias,
418 allow_observers,
419 ally_orb_color,
420 ally_sighted_interrupts,
421 animate_map,
422 animate_water,
423 auto_pixel_scale,
424 auto_save_max,
425 bell_volume,
426 blindfold_replay,
427 campaign_rng_mode,
428 campaign_server,
429 chat_lines,
430 chat_timestamp,
431 completed_campaigns,
432 confirm_end_turn,
433 core,
434 custom_command,
435 delete_saves,
436 dir_bookmarks,
437 disable_auto_moves,
438 refresh_rate,
439 editor_auto_update_transitions,
440 editor_chosen_addon,
441 editor_draw_hex_coordinates,
442 editor_draw_num_of_bitmaps,
443 editor_draw_terrain_codes,
444 editor_recent_files,
445 enable_planning_mode_on_start,
446 encountered_terrain_list,
447 encountered_units,
448 enemy_orb_color,
449 fi_blocked_in_game,
450 fi_friends_in_game,
451 fi_invert,
452 fi_vacant_slots,
453 floating_labels,
454 fullscreen,
455 game_preset,
456 grid,
457 gui2_theme,
458 hide_whiteboard,
459 history,
460 host,
461 hotkey,
462 idle_anim,
463 idle_anim_rate,
464 lobby_joins,
465 lobby_whisper_friends_only,
466 locale,
467 login,
468 maximized,
469 message_bell,
470 minimap_draw_terrain,
471 minimap_draw_units,
472 minimap_draw_villages,
473 minimap_movement_coding,
474 minimap_terrain_coding,
475 moved_orb_color,
476 mp_connect_type,
477 mp_countdown,
478 mp_countdown_action_bonus,
479 mp_countdown_init_time,
480 mp_countdown_reservoir_time,
481 mp_countdown_turn_bonus,
482 mp_era,
483 mp_fog,
484 mp_level,
485 mp_level_type,
486 mp_modifications,
487 mp_random_start_time,
488 mp_server_program_name,
489 mp_server_warning_disabled,
490 mp_shroud,
491 mp_turns,
492 mp_use_map_settings,
493 mp_village_gold,
494 mp_village_support,
495 mp_xp_modifier,
496 music,
497 music_volume,
498 options,
499 partial_orb_color,
500 pixel_scale,
502 remember_password,
503 save_replays,
504 scroll,
505 scroll_threshold,
506 selected_achievement_group,
507 server,
508 show_ally_orb,
509 show_disengaged_orb,
510 show_enemy_orb,
511 show_moved_orb,
512 show_partial_orb,
513 show_side_colors,
514 show_status_on_ally_orb,
515 show_tips,
516 show_unmoved_orb,
517 shuffle_sides,
518 skip_ai_moves,
519 skip_mp_replay,
520 sound,
521 sound_volume,
522 sp_modifications,
523 stop_music_in_background,
524 theme,
525 tile_size,
526 turbo,
527 turbo_speed,
528 turn_bell,
529 turn_dialog,
530 ui_sound,
531 ui_volume,
532 unit_standing_animations,
533 unmoved_orb_color,
534 vsync,
535 xresolution,
536 yresolution,
537 ask_delete,
538 chat_message_aging,
539 color_cursors,
540 compress_saves,
541 confirm_load_save_from_different_version,
542 damage_prediction_allow_monte_carlo_simulation,
543 editor_max_recent_files,
544 font_scale,
545 keepalive_timeout,
546 lobby_auto_open_whisper_windows,
547 middle_click_scrolls,
548 mouse_scrolling,
549 scroll_to_action,
550 scroll_when_mouse_outside,
551 show_all_units_in_help,
552 show_combat,
553 show_deprecation,
554 show_attack_miss_indicator,
555 simd_enabled,
556 use_twelve_hour_clock_format,
557 player_joins_sound,
558 player_joins_notif,
559 player_joins_lobby,
560 player_leaves_sound,
561 player_leaves_notif,
562 player_leaves_lobby,
563 private_message_sound,
564 private_message_notif,
565 private_message_lobby,
566 friend_message_sound,
567 friend_message_notif,
568 friend_message_lobby,
569 public_message_sound,
570 public_message_notif,
571 public_message_lobby,
572 server_message_sound,
573 server_message_notif,
574 server_message_lobby,
575 ready_for_start_sound,
576 ready_for_start_notif,
577 ready_for_start_lobby,
578 game_has_begun_sound,
579 game_has_begun_notif,
580 game_has_begun_lobby,
581 turn_changed_sound,
582 turn_changed_notif,
583 turn_changed_lobby,
584 game_created_sound,
585 game_created_notif,
586 game_created_lobby,
587 addon_icons,
588 reach_map_border_opacity,
589 reach_map_tint_opacity,
590 reach_map_darken_opacity,
591 reach_map_darken_tex,
592 reach_map_color,
593 reach_map_enemy_color
594 )
595};
This class is responsible for reading all available achievements from mainline's and any add-ons' ach...
#define ENUM_AND_ARRAY(...)
Definition enum_base.hpp:96
Keyboard shortcuts for game actions.
Audio output for sound and music.
#define ADDPREF(pref)
Contains all valid preferences attributes.
The base template for associating string values with enum values.
Definition enum_base.hpp:33