Click here to Skip to main content
15,881,173 members
Articles / Desktop Programming / WTL

The Psychology of a WTL Project: Lowercase Cause (a typing program)

Rate me:
Please Sign up or sign in to vote.
4.99/5 (32 votes)
20 Apr 200524 min read 63.5K   2.7K   25  
A psychological journey into a project crafted from start to finish.
#pragma once
#include "stdafx.h"
#include "logic.h"

// singleton for preferences
class settings
{
public:
	static void set_fixed_font(HFONT fixed_font) { _fixed_font = fixed_font; }
	static HFONT get_fixed_font() { return _fixed_font; }

	static int get_last_timed_minutes() { return _last_timed_minutes; }
	static int get_last_difficulty() { return _last_difficulty; }
	static game_type get_last_type() { return _last_type; }
	static std::string get_last_phrase_file() { return _last_phrase_file; }

	static void set_last_timed_minutes(int minutes)
	{ _last_timed_minutes = minutes; }
	static void set_last_difficulty(int difficulty)
	{ _last_difficulty = difficulty; }
	static void set_last_type(game_type type)
	{ _last_type = type; }
	static void set_last_phrase_file(const std::string phrase_file)
	{ _last_phrase_file = phrase_file; }

	static void save();
	static void load();

private:
	static HFONT _fixed_font;
	static int _last_timed_minutes;
	static int _last_difficulty;
	static game_type _last_type;
	static std::string _last_phrase_file;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions