void start( RenderWindow & okno)
{
short roz_x = 1280, roz_y =720 ;
bool full = 0;
bool frame = 0;
konsola.log("uruchamianie programu");
string Text;
TiXmlDocument doc("opcje.xml");
//wczytywanie z opcje.xml
if (doc.LoadFile())
{
TiXmlHandle hDoc(&doc);
TiXmlElement* pElem;
//pelen ekran
pElem = hDoc.FirstChild("ustawienia").Child("okno", 0).Child("pelen_ekran",0).ToElement();
if (pElem)
{
Text = pElem->GetText();
if (Text == "true" || Text == "True")
{
full = 1;
}
else
{
pElem = hDoc.FirstChild("ustawienia").Child("okno", 0).Child("ramki", 0).ToElement();
Text = pElem->GetText();
if (Text == "true" || Text == "True")
{
frame = 1;
}
}
}
else { konsola.log("nie znaleziono elementu pelen ekran"); }
//wczytywanie szerokosci
pElem = hDoc.FirstChild("ustawienia").Child("okno", 0).Child("szerokosc", 0).ToElement();
if (pElem)
{
Text = pElem->GetText();
string::size_type sz;
int dimension =stoi(Text, &sz);
if (dimension <= 1920 && dimension >= 0)
{
roz_x = dimension;
}
}
else { konsola.log("nie znaleziono elementu szerokosc"); }
//wczytywanie dlugosci
pElem = hDoc.FirstChild("ustawienia").Child("okno", 0).Child("wysokosc", 0).ToElement();
if (pElem)
{
Text = pElem->GetText();
string::size_type sz;
int dimension = stoi(Text, &sz);
if (dimension >= 0 && dimension <=1080)
{
roz_y = dimension;
}
}
else { konsola.log("nie znaleziono elementu dlugosc"); }
} else konsola.log("nie wczytano pliku opcje.xml");
//tworzy okno
if (full)
{
okno.create(VideoMode(roz_x, roz_y), "SFML_Buldier", Style::Fullscreen);
}
else
{
if (frame) { okno.create(VideoMode(roz_x, roz_y), "SFML_Buldier", Style::Titlebar | Style::Close); }
else{ okno.create(VideoMode(roz_x, roz_y), "SFML_Buldier", Style::None);
}
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}