From cc2571b99c37cb7484c1827375b83a6962a9a39c 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: Fri, 27 Sep 2019 16:34:57 +0400
Subject: [PATCH] Add files via upload
Edited main.cpp and Added pictures with orange, green, blue and purple buttons.
---
FallSimulation.cpp | 82 +++++++++++++++++++++++++++++++++-------
pictures/blue-but.bmp | Bin 0 -> 38454 bytes
pictures/green-but.bmp | Bin 0 -> 38454 bytes
pictures/orange-but.bmp | Bin 0 -> 38454 bytes
pictures/purple-but.bmp | Bin 0 -> 38454 bytes
5 files changed, 68 insertions(+), 14 deletions(-)
create mode 100644 pictures/blue-but.bmp
create mode 100644 pictures/green-but.bmp
create mode 100644 pictures/orange-but.bmp
create mode 100644 pictures/purple-but.bmp
diff --git a/FallSimulation.cpp b/FallSimulation.cpp
index 78ebeac..b4e73c5 100644
--- a/FallSimulation.cpp
+++ b/FallSimulation.cpp
@@ -3,6 +3,9 @@
using namespace std;
+const COLORREF MY_LIGHTBLUE = RGB(75, 127, 196);
+const COLORREF MY_BISQUE = RGB(255, 214, 89);
+
int middleX;
int middleY;
@@ -15,15 +18,30 @@ struct Button {
HDC picture;
};
+HDC block;
+HDC quest;
+HDC orange_but;
+HDC green_but;
+HDC blue_but;
+HDC purple_but;
+
void background(COLORREF color);
void drawMenu();
-void drawButton(Button but);
-void loadingAnimation(int delay);
+void drawButton(Button but, bool picture);
+void loadingAnimation(int delay, int speed);
void mainFunc();
int main()
{
txCreateWindow(1300, 600);
+
+ block = txLoadImage("pictures\\block.bmp");
+ quest = txLoadImage("pictures\\question.bmp");
+ orange_but = txLoadImage("pictures\\orange_but.bmp");
+ green_but = txLoadImage("pictures\\green_but.bmp");
+ blue_but = txLoadImage("pictures\\blue_but.bmp");
+ purple_but = txLoadImage("pictures\\purple_but.bmp");
+
middleX = txGetExtentX() / 2;
middleY = txGetExtentY() / 2;
extentX = txGetExtentX();
@@ -34,13 +52,27 @@ int main()
txBegin();
- txSleep(50);
- loadingAnimation(10);
txSleep(1000);
+
+ txSetColor(MY_LIGHTBLUE, 2);
+ txSetFillColor(TX_WHITE);
+ txRectangle(0, 0, extentX, extentY);
+
+ txSetColor(MY_LIGHTBLUE, 2);
+ txSetFillColor(MY_LIGHTBLUE);
+ txRectangle(0, 0, extentX, 50);
+
+ txSetColor(TX_BLACK, 3);
+ txSetFillColor(TX_WHITE);
+ txDrawText(0, 0, extentX, 50, "Конструктор уровней игры FallSimulation");
+
drawMenu();
txEnd();
+ txDeleteDC(block);
+ txDeleteDC(quest);
+
txDisableAutoPause();
}
@@ -50,7 +82,7 @@ void background(COLORREF color)
txClear();
}
-void drawButton(Button but)
+void drawButton(Button but, bool picture)
{
//drawing button
txRectangle(but.coords.left,
@@ -84,11 +116,24 @@ void drawMenu()
}, "Exit"
};
+ //button "Settings"
+ Button buttonSets = {
+ {
+ extentX - 100, 0,
+ extentX , 50
+ }, "Settings"
+ };
+
txSetColor(TX_BLACK, 3);
txSetFillColor(TX_WHITE);
- drawButton(buttonPlay);
- drawButton(buttonExit);
+ drawButton(buttonPlay, true);
+ drawButton(buttonExit, true);
+
+ txSetColor(TX_BLACK, 3);
+ txSetFillColor(TX_TRANSPARENT);
+
+ drawButton(buttonSets, false);
txSleep(50);
@@ -98,10 +143,10 @@ void drawMenu()
txSleep(10);
}
- loadingAnimation(18);
+ loadingAnimation(15, 3);
txSleep(50);
+ //txMessageBox("Запуск игры пока что не работает!", "Ошибка");
mainFunc();
- txMessageBox("Запуск игры пока что не работает!", "Ошибка");
}
if (In(txMousePos(), buttonExit.coords) && txMouseButtons() & 1) {
while (txMouseButtons() & 1) {
@@ -110,16 +155,28 @@ void drawMenu()
break;
}
+ if (In(txMousePos(), buttonSets.coords) && txMouseButtons() & 1) {
+ while(txMouseButtons() & 1) {
+ txSleep(10);
+ }
+
+ txSetColor(TX_BLACK, 3);
+ txSetFillColor(MY_BISQUE);
+
+ txRectangle(middleX - 200, middleY - 100, middleX + 200, middleY + 100);
+ }
+
+ txSleep(10);
}
}
-void loadingAnimation(int delay)
+void loadingAnimation(int delay, int speed)
{
background(TX_WHITE);
for (int circle_radius = 0;
circle_radius * circle_radius < extentX * extentX + extentY * extentY;
- circle_radius += 3) {
+ circle_radius += speed) {
txSetColor(TX_BLACK, 2);
txSetFillColor(TX_BLACK);
@@ -134,9 +191,6 @@ void loadingAnimation(int delay)
void mainFunc()
{
- HDC block = txLoadImage("pictures\\block.bmp");
- HDC quest = txLoadImage("pictures\\question.bmp");
-
txBitBlt(txDC(), extentX - 60, 0, 60, 60, block);
txBitBlt(txDC(), extentX - 60, 60, 60, 60, quest);
}
diff --git a/pictures/blue-but.bmp b/pictures/blue-but.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..eea3c0cbbf8da7e4fd2f9e2cb4ef905672c4123d
GIT binary patch
literal 38454
zcmeI5c~n(Z6vjz&$RVtpa>&v!aRLEB5CudY2$EXnkSo*F%mHTs0c8fKT;-VNGBt-B
zmT9RgHPp<^kpM+hR6vwDW=Fu?cY3V*-h&JG;vfCd+jo8MuJ`V{@2=&K&wchi=iIXg
zdE2fx`FFF$z8hZW@p8uNC6l(;W5f4nU)8>}2TV+;PFqSmUHpk+whEnO83%!w@96Aa
zN;*d+`E@dj!pRlobbK>Kc+;$&w4g8f_9H(B@@E+n0Y7_MXiIY}#b1AS2xTNIc&7HR
zD=KKaKl$_^TsFvsg56lgPGGSsEpnte78Es%(yrESANg;8+bIGRF0y2>vBTv5P}K
7^#qz{E$^sM4TZZ?1k0ERglXhsi@&329}BW-@{z&uP!IC&U-dd+
z?zGgCR(L&~JD}(jtNc+G1*2L2e*)qUJ=XHkG<%Blpygf^;ZfBXiwB8JDLu)+Le)Qn
zd(xr-2ERpsS~>LL)P8q+wT*31?@Il8u?_39jElg_^)8#3Bz0_&H=-vk^Q`KwC9c9+
ze?O@1rphCmW{MPDzcGy(Qtsz`qf?8&8r4r|(fH~c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%W!A==9ONtBZ&_ADkK5kTGW;yl8%EB&g1h(%ZcS$4y5DW++yg}#W(
zN9j=s<)%~CU6!#E$WEoAJjzZX%xU*`&^2&y3(7sm$H>}>?j_Ppb6o}hh&+lL
z`YT{9X&6!RBr+~s6D=d|7U5Wyu@JB(lqNwch450vQTPZ5n|u^KRe3^gnphPCm#T6d
z$z%M63BYEEKQUX?no2qkvqn*8yn5VYq{d7Dp$3jZ(XM49MY{E38>*b_2^SM-(DuP#
z`oq@7%+}cc?eJ32Ai`W?)Ko&KLARB*V%LkAO8-|$=fwPE4E?}hxT8dAIhOGdz+W6s
Wa^VpzOm8TErtb@W&jkKU0{;MJHc7<*
literal 0
HcmV?d00001
diff --git a/pictures/green-but.bmp b/pictures/green-but.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..c363b53a3bc90893fe5f0a05ab5a707b47439004
GIT binary patch
literal 38454
zcmeI5TWl0n9L7)4S^|aE+5i!ur8dwA1q3W5JaBoSFI--DfbhWe5yBe*LI?yxxF$e?
zA%q7)C>NERT%`?{+J*wHf+EC1qqR^&Q9&-LSi|SHthCFS>F(c{_`rUfZ?|X8oSCG*
z{pHN;%Ap!Z%kwZVRH~l0Ubs{mc^&zwD>~>t
zQj&&1(Pxo2J<^$!I+ovQ2)AnkHpHmZUc7({L8&_Z>4tqC+2@EOZn%>41V$WoqxMI-
zub?WdX+&eYPcKWsmYsih>;s1%bsrv6M4+7jdl+_HZ#?tu>Wt1WZTjc$GA#4FN^Oa3
z%d@E=ClwL!2~Z67UGBNB)^6;MRm+o#i`;PVX*c)_MFheL@Mt)w%=fAjI<O`-2H1xdc
zU+MBMy8LQI1PlZ&y1XmCSNC!MBu@HXRYh7VB48xIUdU7E25ub3aj)|IYM1+!A_7(d
z`ImgJuHxzmobbHrSL6C#Q$)Z@Ag|W<>Kd*Ez2bTMd)E~auoB3*YVxYjH<2@ZMFfll
z`h08hs`m}ot4Nf7}n0ro-`uQGmi{E37j0!9KEO(w5+dpi9WMFgw_y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