projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20000721-1-src
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 51ba20555a210ed3419bc2f6c98972b48dbb92bd..3bf2c5a5ad9644c6587e4a4b1655528ff763a7e9 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-330,23
+330,13
@@
int getFontHeight(int font_size, int font_type)
void DrawInitText(char *text, int ypos, int color)
{
void DrawInitText(char *text, int ypos, int color)
{
-#ifdef USE_SDL_LIBRARY
if (window && pix[PIX_SMALLFONT])
if (window && pix[PIX_SMALLFONT])
- {
- ClearRectangle(window, 0, ypos, WIN_XSIZE, FONT2_YSIZE);
- DrawTextExt(window, gc, (WIN_XSIZE - strlen(text) * FONT2_XSIZE)/2,
- ypos, text, FS_SMALL, color);
- SDL_Flip(window);
- }
-#else
- if (display && window && pix[PIX_SMALLFONT])
{
ClearRectangle(window, 0, ypos, WIN_XSIZE, FONT2_YSIZE);
DrawTextExt(window, gc, (WIN_XSIZE - strlen(text) * FONT2_XSIZE)/2,
ypos, text, FS_SMALL, color);
FlushDisplay();
}
{
ClearRectangle(window, 0, ypos, WIN_XSIZE, FONT2_YSIZE);
DrawTextExt(window, gc, (WIN_XSIZE - strlen(text) * FONT2_XSIZE)/2,
ypos, text, FS_SMALL, color);
FlushDisplay();
}
-#endif
}
void DrawTextFCentered(int y, int font_type, char *format, ...)
}
void DrawTextFCentered(int y, int font_type, char *format, ...)
@@
-1957,14
+1947,13
@@
boolean Request(char *text, unsigned int req_state)
}
case EVENT_KEYPRESS:
}
case EVENT_KEYPRESS:
- switch(XLookupKeysym((KeyEvent *)&event,
- ((KeyEvent *)&event)->state))
+ switch(GetEventKey((KeyEvent *)&event, TRUE))
{
{
- case
XK
_Return:
+ case
KEY
_Return:
result = 1;
break;
result = 1;
break;
- case
XK
_Escape:
+ case
KEY
_Escape:
result = 0;
break;
result = 0;
break;