Repository navigation
Expand file tree
/
Copy pathGUI_Layout.c
More file actions
95 lines (78 loc) · 4.32 KB
/
Copy pathGUI_Layout.c
File metadata and controls
95 lines (78 loc) · 4.32 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*******************************************************************************************
*
* LayoutName v1.0.0 - Tool Description
*
* LICENSE: Propietary License
*
* Copyright (c) 2022 raylib technologies. All Rights Reserved.
*
* Unauthorized copying of this file, via any medium is strictly prohibited
* This project is proprietary and confidential unless the owner allows
* usage in any other form by expresely written permission.
*
**********************************************************************************************/
#include "raylib.h"
#define RAYGUI_IMPLEMENTATION
#include "raygui.h"
//----------------------------------------------------------------------------------
// Controls Functions Declaration
//----------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------
int main()
{
// Initialization
//---------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "layout_name");
// layout_name: controls initialization
//----------------------------------------------------------------------------------
bool UserProvidedNameBTNPressed = false;
bool RandomNameBtnPressed = false;
bool SaveBTNPressed = false;
bool RetryBTNPressed = false;
//----------------------------------------------------------------------------------
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// TODO: Implement required update logic
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)));
// raygui: controls drawing
//----------------------------------------------------------------------------------
GuiLabel((Rectangle){ 40, 80, 400, 40 }, "Welcome Adventurer! Would you like to provide a name or be given a name?");
UserProvidedNameBTNPressed = GuiButton((Rectangle){ 48, 104, 120, 24 }, "Own Name");
RandomNameBtnPressed = GuiButton((Rectangle){ 224, 104, 120, 24 }, "Give me a Name");
GuiLabel((Rectangle){ 48, 168, 120, 24 }, "Hello, NAME");
GuiLabel((Rectangle){ 48, 192, 168, 24 }, "Here are your current stats: ");
GuiLabel((Rectangle){ 48, 232, 120, 24 }, "SAMPLE TEXT");
GuiLabel((Rectangle){ 48, 264, 120, 24 }, "SAMPLE TEXT");
GuiLabel((Rectangle){ 48, 296, 120, 24 }, "SAMPLE TEXT");
GuiLabel((Rectangle){ 48, 328, 120, 24 }, "SAMPLE TEXT");
GuiLabel((Rectangle){ 48, 360, 120, 24 }, "SAMPLE TEXT");
GuiLabel((Rectangle){ 48, 392, 120, 24 }, "SAMPLE TEXT");
GuiLabel((Rectangle){ 48, 424, 504, 32 }, "Would you like to Save this information to parchment? Or would you like to retry this process? ");
SaveBTNPressed = GuiButton((Rectangle){ 48, 472, 120, 24 }, "Save");
RetryBTNPressed = GuiButton((Rectangle){ 224, 472, 120, 24 }, "Retry");
//----------------------------------------------------------------------------------
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
//------------------------------------------------------------------------------------
// Controls Functions Definitions (local)
//------------------------------------------------------------------------------------