-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow.cpp
More file actions
34 lines (28 loc) · 1.07 KB
/
window.cpp
File metadata and controls
34 lines (28 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
This program will be a Chat app
Chat UP!
*/
#include "shared.h"
namespace ray {
#include <raylib.h>
}
void startWindow(){
//window configuration - program for chat
ray::InitWindow(720, 480, "Bate-papo C(hat)++");
//icon this program
ray::Image icon = ray::LoadImage("server_documents/images/icons/icon_user.png");
ray::SetWindowIcon(icon);
//window configuration with raylib
while(!ray::WindowShouldClose()){
ray::BeginDrawing();
int y = 20;
ray::DrawText("The local IP of this computer is:", 20, y, 20, ray::LIGHTGRAY); y += 30;
ray::DrawText(localIP.c_str(), 20, y, 20, ray::LIGHTGRAY); y += 30;
ray::DrawText("Access from your computer using: http://localhost:3000", 20, y, 20, ray::LIGHTGRAY); y += 30;
ray::DrawText(("Access from another device using: http://" + localIP + ":3000").c_str(), 20, y, 20, ray::LIGHTGRAY); y += 30;
ray::DrawText("Press Ctrl+C to stop.", 20, y, 20, ray::LIGHTGRAY);
ray::EndDrawing();
}
ray::UnloadImage(icon);
ray::CloseWindow();
}