projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added option to disable warning about read-only levels when entering editor
[rocksndiamonds.git]
/
src
/
screens.c
diff --git
a/src/screens.c
b/src/screens.c
index d7e5016a54a7a71c0ea09416b53841db89fd4ac3..d596e2674eaa13c9ce9265d0b6562b4b04cc9b51 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-2168,8
+2168,8
@@
void HandleMainMenu(int mx, int my, int dx, int dy, int button)
else if (pos == MAIN_CONTROL_EDITOR)
{
if (leveldir_current->readonly &&
else if (pos == MAIN_CONTROL_EDITOR)
{
if (leveldir_current->readonly &&
-
!strEqual(setup.player_name, "Artsoft")
)
- Request("This level is read
only!", REQ_CONFIRM);
+
setup.editor.show_read_only_warning
)
+ Request("This level is read
-
only!", REQ_CONFIRM);
CloseDoor(DOOR_CLOSE_2);
CloseDoor(DOOR_CLOSE_2);
@@
-4258,19
+4258,13
@@
static void HandleTypeNameExt(boolean initialize, Key key)
name[xpos] = 0;
}
name[xpos] = 0;
}
- else if (key == KSYM_Return)
+ else if (key == KSYM_Return
|| key == KSYM_Escape
)
{
{
- StopTextInput();
-
- setTypeNameValues(name, pos, TRUE);
+ boolean changed = (key == KSYM_Return);
- active = FALSE;
- }
- else if (key == KSYM_Escape)
- {
StopTextInput();
StopTextInput();
- setTypeNameValues(name, pos,
FALSE
);
+ setTypeNameValues(name, pos,
changed
);
active = FALSE;
}
active = FALSE;
}
@@
-6735,6
+6729,8
@@
static struct TokenInfo setup_info_editor[] =
#endif
{ TYPE_SWITCH, &setup.editor.show_element_token, "Show element token:" },
{ TYPE_EMPTY, NULL, "" },
#endif
{ TYPE_SWITCH, &setup.editor.show_element_token, "Show element token:" },
{ TYPE_EMPTY, NULL, "" },
+ { TYPE_SWITCH, &setup.editor.show_read_only_warning, "Show read-only warning:" },
+ { TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },
{ 0, NULL, NULL }
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },
{ 0, NULL, NULL }