#3911 closed enhancement (fixed)
[PATCH] Make AI Settings visible to players
Reported by: | Imarok | Owned by: | Imarok |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
It would be nice if players in the multiplayer gamesetup can see the AI settings but not modify them (as it is made with "More Options")
Attachments (3)
Change History (11)
by , 8 years ago
Attachment: | visible_ai_setting.patch added |
---|
comment:1 by , 8 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 21 |
Summary: | Make AI Settings visible to players → [PATCH] Make AI Settings visible to players |
comment:2 by , 8 years ago
Keywords: | gamesetup removed |
---|---|
Type: | defect → enhancement |
if(
should beif (
- Introduce variables for the new GUI Objects
- Set all attributes of a GUI object in the same place
- It would be nice if the AIconfig page automatically updates if the host changed settings, don't know if it's easily possible (reopening the window?).
follow-up: 4 comment:3 by , 8 years ago
The automatic update seems to be very much work, so I'll don't make it as it is not that important.
follow-up: 5 comment:4 by , 8 years ago
Replying to Imarok:
The automatic update seems to be very much work, so I'll don't make it as it is not that important.
Excuses ;) Not much work at all, see attached patch. You just need a new global in the gamesetup which recalls if you just opened that dialog. If that's the case and new gamesettings arrived, close and reopen the dialog. I couldn't notice the reopening visually. When the dialog is closed, the variable has to be reset, that's all. This way passing the data is a bit cleaner too:
- no derivation of
g_IsController
from the callback argument - no new if in
returnAI()
andg_IsController
doesn't need to be global
The comment // required by the callback function
won't be needed anymore, as it's kinda trivial.
So please review my patch, try to prove that it's broken and in case it is not, I'll commit it and you still get the credit for writing the base of the patch.
by , 8 years ago
Attachment: | visible_ai_setting_v2.patch added |
---|
Update the window when settings were changed.
comment:5 by , 8 years ago
comment:6 by , 8 years ago
Keywords: | review removed |
---|
Makes AI settings visible to all players but only let the controller change them