Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

better user-experience with in-game option "Quit" #4692

Closed
wzdev-ci opened this issue Jan 2, 2018 · 26 comments
Closed

better user-experience with in-game option "Quit" #4692

wzdev-ci opened this issue Jan 2, 2018 · 26 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Jan 2, 2018

resolution_fixed type_patch (an actual patch, not a request for one) | by Forgon


The in-game options button "Quit" is now called "Host Quit" when hosting a multiplayer game -- for both the initial screen (see attached image [raw-attachment:host_quit_button.png]) and the confirmation dialogue that appears after clicking on it (see attached image [raw-attachment:host_quit_confirmation_button.png]).

A new configuration option quitConfirmation allows skipping the confirmation dialogue altogether.

Edit:

The configuration option quitConfirmation has been renamed to hostQuitConfirmation.
The quit confirmation dialog is no longer shown unless the player is hosting a multiplayer game
and hostQuitConfirmation is set to true (the default setting).


Issue migrated from trac:4692 at 2022-04-16 12:58:47 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2018

Forgon uploaded file host_quit_button.png (17.7 KiB)

in-game options button "Quit" is renamed to "Host Quit" when hosting a multiplayer game (initial screen)
host_quit_button.png

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2018

Forgon uploaded file host_quit_confirmation_button.png (93.8 KiB)

in-game options button "Quit" is renamed to "Host Quit" when hosting a multiplayer game (confirmation dialogue)
host_quit_confirmation_button.png

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 2, 2018

Forgon uploaded file quit_confirmation.patch (3.1 KiB)

patch file created with git format-patch (part 2/2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> changed owner from `` to Forgon2100 <forgon2100@gmail.com>

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> commented


In Warzone2100/warzone2100@d1ce675:

#CommitTicketReference repository="" revision="d1ce67517b7453bcc53e33ade6b487b10161828b"
fixes #4692: new configuration option quitConfirmation can skip confirmation dialogue after pressing in-game option buttons "Quit" or "Host Quit" (patch 2/2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> committed [8434]


In Warzone2100/warzone2100@8434f02:

#CommitTicketReference repository="" revision="8434f02e750d512240e0a962fdd9cf7208f89164"
fixes #4692: new configuration option quitConfirmation can skip confirmation dialogue after pressing in-game option buttons "Quit" or "Host Quit" (patch 2/2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon uploaded file host_quit.patch (2.2 KiB)

patch file created with git format-patch (part 1/2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> committed [3]


In Warzone2100/warzone2100@3c27440:

#CommitTicketReference repository="" revision="3c27440913dbd856b5aa3e98ec062b0e0a88ff19"
fixes #4692: when hosting a multiplayer game, replace in-game options string "Quit" with "Host Quit" (patch 1/2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon2100 <forgon2100@...> committed [2]


In Warzone2100/warzone2100@2e2c2a8:

#CommitTicketReference repository="" revision="2e2c2a872ea85ff502aa1b160d5a0c955b4a27dd"
fixes #4692: new configuration option quitConfirmation can skip confirmation dialogue after pressing in-game option buttons "Quit" or "Host Quit" (patch 2/2)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Per changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon changed _comment2 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Per commented


This added an assert/crash when going into the game options:
info |02:14:17: [widgSetButtonState:560] Couldn't find widget by ID 20311

``` 
(gdb) bt 
#0  0x00007ffff79b3ffb in raise () at /lib64/libpthread.so.0 
#1  0x0000000000857080 in widgSetButtonState(W_SCREEN*, unsigned int, unsigned int) (psScreen=0x39384c0, id=20311, state=2) at ../../../lib/widget/widget.cpp:560 
#2  0x0000000000624e28 in startGameOptionsMenu() () at ../../src/frontend.cpp:1285 
#3  0x0000000000626a03 in changeTitleMode(tMode) (mode=GAME) at ../../src/frontend.cpp:1761 
#4  0x0000000000622144 in runOptionsMenu() () at ../../src/frontend.cpp:675 
#5  0x0000000000846742 in titleLoop() () at ../../src/wrappers.cpp:218 
#6  0x00000000006a5a9f in runTitleLoop() () at ../../src/main.cpp:699 
#7  0x00000000006a5dca in mainLoop() () at ../../src/main.cpp:771 
#8  0x0000000000905de8 in wzMainEventLoop() () at ../../../lib/sdl/main_sdl.cpp:1551 
#9  0x00000000006a6a86 in realmain(int, char**) (argc=1, argv=0x7fffffffde38) at ../../src/main.cpp:1088 
#10 0x000000000090140b in main(int, char**) (argc=1, argv=0x7fffffffde38) at ../../../lib/sdl/main_sdl.cpp:65 
```

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon changed _comment1 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 6, 2018

Forgon commented


Replying to Warzone2100/old-trac-import#4692 (comment:5):

This added an assert/crash when going into the game options:
info |02:14:17: [widgSetButtonState:560] Couldn't find widget by ID 20311

(gdb) bt 
#0  0x00007ffff79b3ffb in raise () at /lib64/libpthread.so.0 
#1  0x0000000000857080 in widgSetButtonState(W_SCREEN*, unsigned int, unsigned int) (psScreen=0x39384c0, id=20311, state=2) at ../../../lib/widget/widget.cpp:560 
#2  0x0000000000624e28 in startGameOptionsMenu() () at ../../src/frontend.cpp:1285 
#3  0x0000000000626a03 in changeTitleMode(tMode) (mode=GAME) at ../../src/frontend.cpp:1761 
#4  0x0000000000622144 in runOptionsMenu() () at ../../src/frontend.cpp:675 
#5  0x0000000000846742 in titleLoop() () at ../../src/wrappers.cpp:218 
#6  0x00000000006a5a9f in runTitleLoop() () at ../../src/main.cpp:699 
#7  0x00000000006a5dca in mainLoop() () at ../../src/main.cpp:771 
#8  0x0000000000905de8 in wzMainEventLoop() () at ../../../lib/sdl/main_sdl.cpp:1551 
#9  0x00000000006a6a86 in realmain(int, char**) (argc=1, argv=0x7fffffffde38) at ../../src/main.cpp:1088 
#10 0x000000000090140b in main(int, char**) (argc=1, argv=0x7fffffffde38) at ../../../lib/sdl/main_sdl.cpp:65 

Judging from the linenumbers given in the log, this might be related to player colours, which are horribly broken. I have never had this problem myself. Could you thus tell me how to reproduce it?

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 7, 2018

Per commented


In latest trunk, all I have to do is enter the game options menu. It immediately assert fails.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 8, 2018

Berserk Cyborg commented


I don't get any assert at all. Tried it on Windows 10 and Ubuntu MATE 16.04.

It does say it will assert if there is a bad color though it looks like it accounts for that?

_ FIXME: if playercolor = 1-3, then we Assert in widgSetButtonState() since we don't define FE_P1 - FE_P3
_ I assume the reason is that in SP games, those are reserved for the AI?  Valid values are 0, 4-7.
// This is a workaround, until we find what is setting that to 1-3.  See configuration.c:701
playercolor = war_GetSPcolor();
if (playercolor >= 1 && playercolor <= 3)
{
	playercolor = 0;
}
widgSetButtonState(psWScreen, FE_P0 + playercolor, WBUT_LOCK); //<--line 1285

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 8, 2018

Per commented


Now I cannot reproduce it anymore, either. Weird. I guess I might have had an unclean build...

@wzdev-ci
Copy link
Contributor Author

Forgon changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

Forgon changed resolution from fixed to ``

@wzdev-ci
Copy link
Contributor Author

Forgon edited the issue description

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file host_quit_confirmation.patch (7.3 KiB)

patch file based on revision 59a6222bea41d46a8ee42575f8b45ec69c421ff2

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Forgon2100 <forgon2100@...> commented


In Warzone2100/warzone2100@d41d0e3:

#CommitTicketReference repository="" revision="d41d0e31f3f3f49a9f7dd166567ab96bf22dcd94"
Change quit confirmation dialog in in-game options

* rename configuration option quitConfirmation to hostQuitConfirmation
* show quit confirmation dialog only if player is hosting a multiplayer game
  and hostQuitConfirmation is set to true (the default setting)

Fixes #4692

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant