-
Notifications
You must be signed in to change notification settings - Fork 12
/
about.c
45 lines (37 loc) · 1.16 KB
/
about.c
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
/*
* Komposter
*
* Copyright (c) 2010 Noora Halme et al. (see AUTHORS)
*
* This code is licensed under the GNU General Public
* License version 2. See LICENSE for full text.
*
* Info dialog
*
*/
#include "about.h"
void about_draw(void)
{
draw_textbox((DS_WIDTH/2), (DS_HEIGHT/2), 120, 260, "", 0);
render_text("komposter", (DS_WIDTH/2)-120, (DS_HEIGHT/2)-32, 0, 0xffb05500, 0);
render_text(K_VERSION, (DS_WIDTH/2)+120, (DS_HEIGHT/2)-32, 2, 0xffb05500, 2);
glBegin(GL_LINES); glColor4f(0.5f, 0.5f, 0.5f, 0.5f);
glVertex2f((DS_WIDTH/2)-120, (DS_HEIGHT/2)-23.5);
glVertex2f((DS_WIDTH/2)+120, (DS_HEIGHT/2)-23.5);
glEnd();
render_text(K_ABOUT1, (DS_WIDTH/2), (DS_HEIGHT/2)+6, 2, 0xff707070, 1);
render_text(K_ABOUT2, (DS_WIDTH/2), (DS_HEIGHT/2)+18, 2, 0xff707070, 1);
render_text(K_COPYRIGHT, (DS_WIDTH/2), (DS_HEIGHT/2)+50, 2, 0xff505050, 1);
}
void about_hover(int x, int y)
{
// nothing here
}
void about_click(int button, int state, int x, int y)
{
if (state==GLUT_DOWN) { dialog_close(); return; }
}
void about_keyboard(unsigned char key, int x, int y)
{
if (key==27 || key==' ' || key==13) { glutIgnoreKeyRepeat(1); dialog_close(); return; }
}