help me learn to read documentation

Robin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Oct 1 12:15:38 PDT 2015


Hi. I like to learn programming by examples but I need help 
learning how to read documentation. I have some idea of how it 
works in some aspects but in others i get completely stuck 
because there are no examples or code snippets.

I am using dgame (dgame-dev.de) and im reading the documentation 
for changing the background text of my font in my program.
I have the basic code for font creation but i need to make 
changes to the colors.

import std.stdio;
import std.system;

import Dgame.System;
import Dgame.Window;
import Dgame.Graphic;
import Dgame.Audio;
import Dgame.Math;

void main()
{
      Font dejavu = Font("resources/dejavu.ttf", 12);
      Text CurrentFps = new Text(dejavu);

      ..window loop
}

The documentation here 
(http://dgame-dev.de/index.php?controller=learn&mode=package&package=graphic&module=Text&version=0.6)...
gives me the Text() class but i dont know how to use "foreground, 
background, and Font mode" or at least turn it into usable syntax.


More information about the Digitalmars-d-learn mailing list