About Store Forum Documentation Contact



Post Reply 
Use font in the program
Author Message
Babulesnik Offline
Member

Post: #1
Use font in the program
I have created a file *.font. How now it to use in the program?
01-21-2011 07:12 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Use font in the program
TextDS tds;
tds.font=Fonts("...");
01-21-2011 07:47 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #3
RE: Use font in the program
(01-21-2011 07:47 PM)Esenthel Wrote:  TextDS tds;
tds.font=Fonts("...");

TextDS tds;
tds.font=Fonts("../Data/Gui/myfont.font");

D.text (0, 0,"Привет мир !");

Does not work...
01-21-2011 10:38 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Use font in the program
D.text (tds, 0, 0,"Привет мир !");
01-21-2011 11:06 PM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #5
RE: Use font in the program
(01-21-2011 11:06 PM)Esenthel Wrote:  D.text (tds, 0, 0,"Привет мир !");

If so that is absolutely not visible the text (

/******************************************************************************/
#include "stdafx.h" // include precompiled header
#include "resource.h" // include resources (icon)
#include "kosti.h"
TextDS tds;
/******************************************************************************/
void InitPre() // init before engine inits
{
App.name("Mesh");
Paks.add("../Data/engine.pak");
D.full(true);
}
/******************************************************************************/
Bool Init() // init after engine inits
{
tds.font=Fonts("../Data/Gui/font.font");
return true;
}
/******************************************************************************/
void Shut() // shut at exit
{

}
/******************************************************************************/
Bool Update() // main updating
{
if(Kb.bp(KB_ENTER))State_Kosti.set(2.0);
if(Kb.bp(KB_ESC))return false; // exit if escape on the keyboard pressed
return true; // continue
}
/******************************************************************************/
void Draw() // main drawing
{
D.clear(TURQ); // clear screen to turquoise color
D.text (tds,0, 0,"Привет мир"); // draw text at (0, 0.1) position
}
/******************************************************************************/
(This post was last modified: 01-22-2011 12:08 AM by Babulesnik.)
01-22-2011 12:03 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Use font in the program
Bool Init() // init after engine inits
{
tds.reset();
tds.font=Fonts("../Data/Gui/font.font");
return true;
}
01-22-2011 03:41 AM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #7
RE: Use font in the program
(01-22-2011 03:41 AM)Esenthel Wrote:  Bool Init() // init after engine inits
{
tds.reset();
tds.font=Fonts("../Data/Gui/font.font");
return true;
}

Thank you very much.
01-22-2011 05:10 PM
Find all posts by this user Quote this message in a reply
Post Reply