projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20031102-1-src
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index 54ba6a4110cc4863aec45fd9e0f4e1f96d076ba2..8e66c8c9ed7831cc55f2c2b163dab62f8d2a1812 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-155,13
+155,13
@@
static void PlaySound_Menu_Continue(int sound)
void DrawHeadline()
{
void DrawHeadline()
{
- int text1_width = getTextWidth(PROGRAM_TITLE_STRING, FONT_TITLE_1);
- int text2_width = getTextWidth(
WINDOW_SUBTITLE
_STRING, FONT_TITLE_2);
+ int text1_width = getTextWidth(PROGRAM_TITLE_STRING,
FONT_TITLE_1);
+ int text2_width = getTextWidth(
PROGRAM_COPYRIGHT
_STRING, FONT_TITLE_2);
int x1 = SX + (SXSIZE - text1_width) / 2;
int x2 = SX + (SXSIZE - text2_width) / 2;
int x1 = SX + (SXSIZE - text1_width) / 2;
int x2 = SX + (SXSIZE - text2_width) / 2;
- DrawText(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
- DrawText(x2, SY + 46,
WINDOW_SUBTITLE
_STRING, FONT_TITLE_2);
+ DrawText(x1, SY + 8, PROGRAM_TITLE_STRING,
FONT_TITLE_1);
+ DrawText(x2, SY + 46,
PROGRAM_COPYRIGHT
_STRING, FONT_TITLE_2);
}
static void ToggleFullscreenIfNeeded()
}
static void ToggleFullscreenIfNeeded()
@@
-1241,12
+1241,6
@@
static void drawChooseTreeList(int first_entry, int num_page_entries,
int yoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : yoffset_setup);
int last_game_status = game_status; /* save current game status */
int yoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : yoffset_setup);
int last_game_status = game_status; /* save current game status */
-#if 1
- DrawBackground(mSX, mSY, SXSIZE - 32 + menu.scrollbar_xoffset, SYSIZE);
-#else
- DrawBackground(SX, SY, SXSIZE - 32, SYSIZE);
-#endif
-
title_string =
(ti->type == TREE_TYPE_LEVEL_DIR ? "Level Directories" :
ti->type == TREE_TYPE_GRAPHICS_DIR ? "Custom Graphics" :
title_string =
(ti->type == TREE_TYPE_LEVEL_DIR ? "Level Directories" :
ti->type == TREE_TYPE_GRAPHICS_DIR ? "Custom Graphics" :
@@
-1258,6
+1252,11
@@
static void drawChooseTreeList(int first_entry, int num_page_entries,
/* force LEVELS font on artwork setup screen */
game_status = GAME_MODE_LEVELS;
/* force LEVELS font on artwork setup screen */
game_status = GAME_MODE_LEVELS;
+ /* clear tree list area, but not title or scrollbar */
+ DrawBackground(mSX, mSY + MENU_SCREEN_START_YPOS * 32,
+ SXSIZE - 32 + menu.scrollbar_xoffset,
+ MAX_MENU_ENTRIES_ON_SCREEN * 32);
+
for(i=0; i<num_page_entries; i++)
{
TreeInfo *node, *node_first;
for(i=0; i<num_page_entries; i++)
{
TreeInfo *node, *node_first;
@@
-1930,23
+1929,25
@@
static void drawSetupValue(int pos)
int xpos = MENU_SCREEN_VALUE_XPOS;
int ypos = MENU_SCREEN_START_YPOS + pos;
int font_nr = FONT_VALUE_1;
int xpos = MENU_SCREEN_VALUE_XPOS;
int ypos = MENU_SCREEN_START_YPOS + pos;
int font_nr = FONT_VALUE_1;
- char *value_string = getSetupValue(setup_info[pos].type & ~TYPE_GHOSTED,
- setup_info[pos].value);
+ int type = setup_info[pos].type;
+ void *value = setup_info[pos].value;
+ char *value_string = (!(type & TYPE_GHOSTED) ? getSetupValue(type, value) :
+ "n/a");
if (value_string == NULL)
return;
if (value_string == NULL)
return;
- if (
setup_info[pos].
type & TYPE_KEY)
+ if (type & TYPE_KEY)
{
xpos = 3;
{
xpos = 3;
- if (
setup_info[pos].
type & TYPE_QUERY)
+ if (type & TYPE_QUERY)
{
value_string = "<press key>";
font_nr = FONT_INPUT_1_ACTIVE;
}
}
{
value_string = "<press key>";
font_nr = FONT_INPUT_1_ACTIVE;
}
}
- else if (
setup_info[pos].
type & TYPE_STRING)
+ else if (type & TYPE_STRING)
{
int max_value_len = (SCR_FIELDX - 2) * 2;
{
int max_value_len = (SCR_FIELDX - 2) * 2;
@@
-1956,10
+1957,9
@@
static void drawSetupValue(int pos)
if (strlen(value_string) > max_value_len)
value_string[max_value_len] = '\0';
}
if (strlen(value_string) > max_value_len)
value_string[max_value_len] = '\0';
}
- else if (
setup_info[pos].
type & TYPE_BOOLEAN_STYLE)
+ else if (type & TYPE_BOOLEAN_STYLE)
{
{
- font_nr = (*(boolean *)(setup_info[pos].value) ? FONT_OPTION_ON :
- FONT_OPTION_OFF);
+ font_nr = (*(boolean *)value ? FONT_OPTION_ON : FONT_OPTION_OFF);
}
DrawText(mSX + xpos * 32, mSY + ypos * 32,
}
DrawText(mSX + xpos * 32, mSY + ypos * 32,