From 027699c30a6ac5b2f5aa2cf72b23fd0905fc3505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= <50486086+DarkCat09@users.noreply.github.com> Date: Mon, 18 Nov 2019 15:37:33 +0300 Subject: [PATCH] Add files via upload Edited main.cpp and Added Help --- FallSimulation.cpp | 52 +++++++++++++++++++++++++++++++-------------- help/help.html | 22 +++++++++++++++++++ help/icon/help.ico | Bin 0 -> 3782 bytes help/icon/help.png | Bin 0 -> 969 bytes 4 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 help/help.html create mode 100644 help/icon/help.ico create mode 100644 help/icon/help.png diff --git a/FallSimulation.cpp b/FallSimulation.cpp index 587fa24..de22492 100644 --- a/FallSimulation.cpp +++ b/FallSimulation.cpp @@ -48,14 +48,14 @@ HDC vdark_stone; void background(COLORREF color); void drawMenu(); -void drawButton(Button but, bool picture); +void drawButton(Button but); void loadingAnimation(int delay, int speed); void mainFunc(); bool addingBlock(bool clicked, RECT blockBut, HDC pic, int blocktype, int* arrElem, MapPart mapParts[]); void addingStone(int* arrElem, MapPart mapParts[]); -int findElem(int* arrElem, RECT expCoords); +int findElem(int* arrElem, RECT expCoords); int main() { @@ -112,7 +112,7 @@ void background(COLORREF color) txClear(); } -void drawButton(Button but, bool picture) +void drawButton(Button but) { //drawing button txRectangle(but.coords.left, @@ -147,12 +147,12 @@ void drawMenu() }, "Exit" }; - //button "Settings" - Button buttonSets = { + //button "Help" + Button buttonHelp = { { extentX - 100, 0, extentX , 50 - }, "Settings" + }, "? Help" }; //button "Play" (to play on created level) @@ -166,15 +166,16 @@ void drawMenu() txSetColor(TX_BLACK, 3); txSetFillColor(TX_WHITE); - drawButton(buttonStart, true); - drawButton(buttonExit, true); + drawButton(buttonStart); + drawButton(buttonExit); txSetColor(TX_BLACK, 3); txSetFillColor(TX_TRANSPARENT); - drawButton(buttonSets, false); + drawButton(buttonHelp); txSleep(50); + bool flwindow = false; while (!GetAsyncKeyState('Q')) { if (!gameIsStarted) { @@ -187,23 +188,41 @@ void drawMenu() txSleep(50); mainFunc(); } - if (In(txMousePos(), buttonExit.coords) && txMouseButtons() & 1) { + if (In(txMousePos(), buttonExit.coords) && txMouseButtons() & 1) { while (txMouseButtons() & 1) { txSleep(10); } 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) { txSleep(10); } - txSetColor(TX_BLACK, 3); - txSetFillColor(MY_BISQUE); - - txRectangle(middleX - 200, middleY - 100, middleX + 200, middleY + 100); + system("start help\\help.html"); } + /* if (In(txMousePos(), buttonPlay.coords) && txMouseButtons() & 1) { MapPart gettedMapParts = readFile("level1.fslvl"); @@ -257,6 +276,7 @@ void drawMenu() } } } + */ } txSleep(10); @@ -340,7 +360,7 @@ void mainFunc() Win32::TransparentBlt(txDC(), fireBut.left, fireBut.top, 120, 120, fire, 0, 0, 60, 60, -1); - drawButton(completeButton, false); + drawButton(completeButton); for (int elem = 0; elem < MAP_LENGHT; elem++) { diff --git a/help/help.html b/help/help.html new file mode 100644 index 0000000..ebe7a13 --- /dev/null +++ b/help/help.html @@ -0,0 +1,22 @@ + + + + Help HTML File + + + + + +

Справка по приложению FallSimulation

+

+ FallSimulation - редактор уровней для этой же игры. Выполнена в стиле Марио. +
+ OpenSource +

+

+ Разработчик: Чечкенёв Андрей Дмитриевич/DarkCat09 +
+ Ссылка на Github +

+ + \ No newline at end of file diff --git a/help/icon/help.ico b/help/icon/help.ico new file mode 100644 index 0000000000000000000000000000000000000000..fd53db7837d9d8320cc339425bf214d79183f10d GIT binary patch literal 3782 zcmchayH8V57{KqPv=#^B>+B3hayx}FD zx6Jdr8YAYCx6TOHSxe2mH(9Y4%#VavzkmIZ>F4+4es@Cp&elrX`o;5vYuw`*p8eOw z9_)91`%3B99GCw3s609tk@18t6G_j?>lR-g9f-)Cx~N>-6t~av&O-U)4^noI)UKGk zIO5CXF)t%W%`q#=w#S6|4kKgDzFglKv+uG;*rhtQZ>*BXha&Q>)suIIiG*dpHT+>? zg9{s~ti4L<&i$U`T5HqvQ9r|kyFm6UV<&9Sp2gVs1wXzy=F9uzS)Oto_RT#p>Dn5% z!Z~&?WOMXZHhULZ_yXH16K)V2rY_El`CHl8Jm25gfS4U=j>yyr!$Y#%LhK-JF}?9O z4A@a;`=T;^$_vd#UtPq1Ir&Xp!`9T+kt2}| zHzeET_O;bYI%#q}WNo3QYK@;b;m>hHu!+I%-@aItKTkXsYH8ToLOs{MGIQG47=fwc z`Z_Pxo|yVM(B7b?mYLB(>DjR;wB9baT=w0)Q5kY-kg~(*t=!3zzQ8S)J=j<|kDY$l zEBy`8qBf_8!o|l=TOv7bx$L3+l``CSE@$)Z12vNCDFtGU{;hMuKx0&9&Sdlr();ak zr>^AroA}l^8@<;#*FT+JqP2zDfjlCIFPXYwxkcC`ha+>fRAVk%Tk!Sl$F$X%W6svv z%N)JQcb$i*UE@ZdVr+7}vuSlf_U-zZe4YK2g) z3iVKCCRbOUXW72LsY)hK`32cy$qGreuF3f^^VZxiamD@7mWsdnH}TC(k>B_AZEQe{ z1+ibZ`qFFW8gd2OqAx=2x@uw?COypUW6Uqal51b(=@EM~gB4?|zsC|4wx8hRpd3?X zsksh5Y`(4C*u0p(OVx8`CTz=I>=}093*vw{FO_3%FJW$>U)kI&V{Ui9OLb=tY)@UI trn>c<9!jh;J21EKY`HqRO!pkV&L-NkwWnx}hoyDMeK+V_|1bRC$3IteDSrR} literal 0 HcmV?d00001 diff --git a/help/icon/help.png b/help/icon/help.png new file mode 100644 index 0000000000000000000000000000000000000000..e9d04556d1c2d88e0a7417b7838cea3baab7fd6b GIT binary patch literal 969 zcmV;)12+7LP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D171l)K~zXfjg`+% z6Hye0?=W;MzJT}!`ULs_CI})bQV@t3u(ai`MB>WWg@_`Ng_fWuViQ=%LKDPlgcyWM z3xW%cTNZ9iT&W2O+xp$P<8(^z44nKH?aaO3ocWz|?udea{Mp%^dA}JOe^GON>hP&y zSN!E7w^-mT)rB6-9yT96cQagnC)AcUyWbiEd2wwE8T~mknhCY0!}TL9V42?oH0adJ zRrXksNuzI73~fo-P+OZ~@V^E&jl{BbF~wrGIGa6Df>y~^)g{f?J2CVnm@5W8E16xH zs@i0E`b9K1PR1v2z!=PHxfQV`tT3-;jJ`FOEBd93o=@R3BW(B5i)bFJLPx#R1Y}&EK8fh1_?3f7||PZEmxvRvy_X#DfcD1W!lTNm8YIy1<5mSS}rQ@GwK#@7^94! z@d|VIa8amv8m!54sEk;t1@UV{}JH}3hcKeuhxt>NUW ztm8&07a6ftuo8VhE*87o*~P6x=O?sWsd&zd-iJ$*F@#>O5zqQ@i)hZtU@o0YpQzH& z<8*F7zR2iak!V@QXeOA8=n9o`&G1xkzR2vb%P5<#H66_LqUqUSu88GAk!P~`?2#D> z=JNVSS{^v)vtz+r6t251N5&cS#Bu-^ku^|cH9iXF8eL1yppyv6JJamLMONgAgKl~p zz!kAI>%v2TU_FOwSH_QvfJ!@*A^u#mV_v1qO3$aDHp!Pl%f(y`x{PZ?KUST-Rq`oN z!CO#$hhEA>_y811LwvYYPg$X&h~_QiXBWCUaXj4My1886&o03Y9*Z;1QF$;f{^A20 zyoWGot3d;Gw95Zh?z=HB*-O!^| ru!o^yGY104jVu0gkz0OH8HK_>k#nUnx2ybx00000NkvXXu0mjfyrj-I literal 0 HcmV?d00001