mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-29 05:42:49 +00:00
ru:: map clicking on Poincare map editor
This commit is contained in:
parent
c73cee19d6
commit
d4a5d43988
@ -278,11 +278,6 @@ void draw_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();
|
||||
drawmessages();
|
||||
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; });
|
||||
break;
|
||||
case mapmode::poincare:
|
||||
case mapmode::klein:
|
||||
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) {
|
||||
getcstat = '-';
|
||||
dialog::add_key_action('-', [] { if(!mouseover) return; current_room = &rooms[mouseover]; switch_mapmode_to(mapmode::standard); });
|
||||
|
Loading…
x
Reference in New Issue
Block a user