draconisPW / PWMAngband

A free, multi-player roguelike dungeon exploration game based on Angband
35 stars 11 forks source link

sdl2: send chat message to message window if chat window closed #586

Closed igroglaz closed 1 year ago

igroglaz commented 1 year ago

/rfe SDL2: send chat message to message window (#1) if chat window (#4) closed.. it's default behaviour in SDL1 client, but in SDL2 chat messages always go to #4 window, while many players hide #4 window

s88100 commented 1 year ago

if remove lines (subwindow-window:4:0:0) from sdl2init.txt

subwindow-window:4:0:0
subwindow-full-rect:4:756:406:408:248
subwindow-font:4:0:10x20x.fon
subwindow-borders:4:true
subwindow-top:4:false:false
subwindow-alpha:4:255

then '1. Messages subwindow' prints text of chat

s88100 commented 1 year ago

https://github.com/draconisPW/PWMAngband/commit/d7c4b2d67eb10d73ef23f3260d686ba2e8680982 subwindows flag 'subwindow->visible' but even if 'visible = false' then the subwindow is loaded

/client/main-sdl2.c
start_window()
. . . . .
for (size_t i = 0; i < N_ELEMENTS(window->subwindows); i++) {
    if (window->subwindows[i] != NULL) {
        load_subwindow(window, window->subwindows[i]);
    }
}
draconisPW commented 1 year ago

Fixed by PR #589 I think.