display a hint when player hidden

This commit is contained in:
Zeno Rogue 2022-03-27 19:12:10 +02:00
parent 00d640fa22
commit 14ed4b7603
4 changed files with 8 additions and 2 deletions

View File

@ -597,6 +597,9 @@ EX void handleKeyNormal(int sym, int uni) {
if(sym == PSEUDOKEY_MENU)
pushScreen(showMainMenu);
if(sym == PSEUDOKEY_NOHINT)
no_find_player = true;
if(sym == '-' || sym == PSEUDOKEY_WHEELDOWN) {
actonrelease = false;

View File

@ -5427,6 +5427,9 @@ EX void normalscreen() {
if(!playerfound && !anims::any_on() && !sphere && !no_find_player && mapeditor::drawplayer)
displayButton(current_display->xcenter, current_display->ycenter, mousing ? XLAT("find the player") : XLAT("press SPACE to find the player"), ' ', 8);
if(!mapeditor::drawplayer && playermoved && !no_find_player)
displayButton(current_display->xcenter, current_display->ycenter, XLAT("move the camera with arrow keys and Home/End"), PSEUDOKEY_NOHINT, 8);
describeMouseover();
}

View File

@ -841,7 +841,7 @@ EX bool isFloor(cell *c) {
}
EX void handle() {
if(!on) return;
if(playermoved || !on) return;
if(floor_dir == -1 || on_floor_of != centerover) {
vector<int> choices;
@ -977,7 +977,6 @@ EX void handle() {
smooth(up, inverse(T) * direct_exp(dx / hypot_d(3, dx) * (eye_level + view_eps)))
);
if(use_T) rotate_view(inverse(spin_T));
playermoved = false;
auto nat = tC0(inverse(View));
if(invalid_point(nat)) {

View File

@ -242,6 +242,7 @@
#define PSEUDOKEY_RELEASE 2503
#define PSEUDOKEY_EXIT 2504
#define PSEUDOKEY_MENU 2505
#define PSEUDOKEY_NOHINT 2506
#ifndef CAP_PNG
#define CAP_PNG (!ISMOBWEB)