mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-06 16:52:59 +00:00
ru:: map clicking on Poincare map editor
This commit is contained in:
@@ -278,11 +278,6 @@ void draw_room() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render_room_objects(current_room);
|
render_room_objects(current_room);
|
||||||
|
|
||||||
ld& scale = scrm.T[0][0];
|
|
||||||
|
|
||||||
mousepx = (mousex - current_display->xcenter) * 2 / scale / current_display->radius + screen_x/2;
|
|
||||||
mousepy = (mousey - current_display->ycenter) * 2 / scale / current_display->radius + screen_y/2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,11 +175,21 @@ void render_the_map() {
|
|||||||
draw_room();
|
draw_room();
|
||||||
drawmessages();
|
drawmessages();
|
||||||
nomsg = false;
|
nomsg = false;
|
||||||
|
if(1) {
|
||||||
|
ld& scale = scrm.T[0][0];
|
||||||
|
mousepx = (mousex - current_display->xcenter) * 2 / scale / current_display->radius + screen_x/2;
|
||||||
|
mousepy = (mousey - current_display->ycenter) * 2 / scale / current_display->radius + screen_y/2;
|
||||||
|
}
|
||||||
dialog::add_key_action('v', [] { cmode = mode::menu; });
|
dialog::add_key_action('v', [] { cmode = mode::menu; });
|
||||||
break;
|
break;
|
||||||
case mapmode::poincare:
|
case mapmode::poincare:
|
||||||
case mapmode::klein:
|
case mapmode::klein:
|
||||||
gamescreen();
|
gamescreen();
|
||||||
|
if(!mouseout() && mouseover && rooms.count(mouseover)) {
|
||||||
|
current_room = &rooms[mouseover];
|
||||||
|
auto h = inverse_shift(ggmatrix(current_room->where), mouseh);
|
||||||
|
tie(mousepx, mousepy) = from_hyper(h);
|
||||||
|
}
|
||||||
if(cmode == mode::editmap) {
|
if(cmode == mode::editmap) {
|
||||||
getcstat = '-';
|
getcstat = '-';
|
||||||
dialog::add_key_action('-', [] { if(!mouseover) return; current_room = &rooms[mouseover]; switch_mapmode_to(mapmode::standard); });
|
dialog::add_key_action('-', [] { if(!mouseover) return; current_room = &rooms[mouseover]; switch_mapmode_to(mapmode::standard); });
|
||||||
|
|||||||
Reference in New Issue
Block a user