Merge pull request #23 from IngCenter/DarkCat09-patch-1

Add files via upload
This commit is contained in:
Mikhail Abramov 2019-11-18 21:51:44 +04:00 committed by GitHub
commit e7bd49bd03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 16 deletions

View file

@ -48,7 +48,7 @@ HDC vdark_stone;
void background(COLORREF color); void background(COLORREF color);
void drawMenu(); void drawMenu();
void drawButton(Button but, bool picture); void drawButton(Button but);
void loadingAnimation(int delay, int speed); void loadingAnimation(int delay, int speed);
void mainFunc(); void mainFunc();
bool addingBlock(bool clicked, RECT blockBut, HDC pic, bool addingBlock(bool clicked, RECT blockBut, HDC pic,
@ -112,7 +112,7 @@ void background(COLORREF color)
txClear(); txClear();
} }
void drawButton(Button but, bool picture) void drawButton(Button but)
{ {
//drawing button //drawing button
txRectangle(but.coords.left, txRectangle(but.coords.left,
@ -147,12 +147,12 @@ void drawMenu()
}, "Exit" }, "Exit"
}; };
//button "Settings" //button "Help"
Button buttonSets = { Button buttonHelp = {
{ {
extentX - 100, 0, extentX - 100, 0,
extentX , 50 extentX , 50
}, "Settings" }, "? Help"
}; };
//button "Play" (to play on created level) //button "Play" (to play on created level)
@ -166,15 +166,16 @@ void drawMenu()
txSetColor(TX_BLACK, 3); txSetColor(TX_BLACK, 3);
txSetFillColor(TX_WHITE); txSetFillColor(TX_WHITE);
drawButton(buttonStart, true); drawButton(buttonStart);
drawButton(buttonExit, true); drawButton(buttonExit);
txSetColor(TX_BLACK, 3); txSetColor(TX_BLACK, 3);
txSetFillColor(TX_TRANSPARENT); txSetFillColor(TX_TRANSPARENT);
drawButton(buttonSets, false); drawButton(buttonHelp);
txSleep(50); txSleep(50);
bool flwindow = false;
while (!GetAsyncKeyState('Q')) { while (!GetAsyncKeyState('Q')) {
if (!gameIsStarted) { if (!gameIsStarted) {
@ -194,16 +195,34 @@ void drawMenu()
break; break;
} }
if (In(txMousePos(), buttonSets.coords) && txMouseButtons() & 1) {
if (In(txMousePos(), buttonHelp.coords))
{
txSetColor(TX_BLACK);
txDrawText(buttonHelp.coords.left - 130,
buttonHelp.coords.bottom + 10,
txGetExtentX() - 10,
buttonHelp.coords.bottom + 100,
"This hyperlink will be\nopen in browser");
}
else
{
txSetColor(TX_WHITE);
txSetFillColor(TX_WHITE);
txRectangle(buttonHelp.coords.left - 130,
buttonHelp.coords.bottom + 10,
txGetExtentX() - 10,
buttonHelp.coords.bottom + 100);
}
if (In(txMousePos(), buttonHelp.coords) && txMouseButtons() & 1) {
while(txMouseButtons() & 1) { while(txMouseButtons() & 1) {
txSleep(10); txSleep(10);
} }
txSetColor(TX_BLACK, 3); system("start help\\help.html");
txSetFillColor(MY_BISQUE);
txRectangle(middleX - 200, middleY - 100, middleX + 200, middleY + 100);
} }
/*
if (In(txMousePos(), buttonPlay.coords) && txMouseButtons() & 1) { if (In(txMousePos(), buttonPlay.coords) && txMouseButtons() & 1) {
MapPart gettedMapParts = readFile("level1.fslvl"); MapPart gettedMapParts = readFile("level1.fslvl");
@ -257,6 +276,7 @@ void drawMenu()
} }
} }
} }
*/
} }
txSleep(10); txSleep(10);
@ -340,7 +360,7 @@ void mainFunc()
Win32::TransparentBlt(txDC(), fireBut.left, fireBut.top, 120, 120, fire, Win32::TransparentBlt(txDC(), fireBut.left, fireBut.top, 120, 120, fire,
0, 0, 60, 60, -1); 0, 0, 60, 60, -1);
drawButton(completeButton, false); drawButton(completeButton);
for (int elem = 0; elem < MAP_LENGHT; elem++) { for (int elem = 0; elem < MAP_LENGHT; elem++) {

22
help/help.html Normal file
View file

@ -0,0 +1,22 @@
<html>
<head>
<meta charset = "UTF-8" />
<title>Help HTML File</title>
<link rel = "stylesheet" href = "css/style.css" />
<link rel = "shortcut_icon" href = "icon/help.ico" />
</head>
<body>
<!-- -->
<h1>Справка по приложению FallSimulation</h1>
<h2>
FallSimulation - редактор уровней для этой же игры. Выполнена в стиле Марио.
<br />
OpenSource
</h2>
<h3>
Разработчик: Чечкенёв Андрей Дмитриевич/DarkCat09
<br />
<a href = "https://github.com/ingcenter/fallsimulator">Ссылка на Github</a>
</h3>
</body>
</html>

BIN
help/icon/help.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
help/icon/help.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B