Page MenuHomeWildfire Games

Make Options Dialog hotkey toggleable in gamesetup, lobby, mainmenu and ingame
Needs ReviewPublic

Authored by ffffffff on Aug 20 2017, 8:51 PM.

Details

Reviewers
elexis
Summary

I suggest key "Alt+O" to toggle

Test Plan

test

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Aug 20 2017, 8:51 PM
ffffffff updated this revision to Diff 3223.Aug 20 2017, 8:56 PM

file added

bb added a subscriber: bb.Nov 14 2017, 5:14 PM
bb added inline comments.
binaries/data/config/default.cfg
152

indentation

Notice that the "O" hotkey will not work in lobby, mp gamesetup etc. (due to chat) So is "Alt+O" still free?

binaries/data/mods/public/gui/common/global.js
2

don't use let for globals => var, also g_OptionsPageShown would be better imo

6

could you explain the g_ViewedPlayer check? (I don't get why it is required)

binaries/data/mods/public/gui/options/options.js
403

multiple statements should be spread over different lines

binaries/data/mods/public/gui/options/options.xml
13–15

was wondering if it would be useful to add a force save close hotkey (kinda how we have for unit deletes, use same modifier as that, don't know if that hotkey can become a global)

ffffffff updated this revision to Diff 4229.Nov 17 2017, 12:35 AM
ffffffff updated this revision to Diff 4231.Nov 17 2017, 12:48 AM

Idk if the new globals.js file is needed, there isn't another file where this function can be placed?

binaries/data/config/default.cfg
152

dialog -> window

binaries/data/mods/public/gui/common/global.js
2

Option in plural?

binaries/data/mods/public/gui/options/options.js
379

Close without save and Save and Close better?

ffffffff updated this revision to Diff 4247.Nov 18 2017, 7:33 AM

Updated options window close dialog.

...

ffffffff edited the summary of this revision. (Show Details)Nov 18 2017, 7:33 AM
ffffffff added inline comments.Nov 18 2017, 7:37 AM
binaries/data/mods/public/gui/options/options.js
379

"Keep temporary and close" and "Save and close"?

Because it keeps the setted option while game is running until exit.

ffffffff updated this revision to Diff 4248.Nov 18 2017, 7:37 AM

Idk if the new globals.js file is needed, there isn't another file where this function can be placed?

didnt find file for globals.

Idk if the new globals.js file is needed, there isn't another file where this function can be placed?

didnt find file for globals.

not true i find functions_global_object.js but this is file is not generaly globaly included. so it may not be made for this purpose. so i just made an js file according to the global.xml file which is overall included (in pages).

ffffffff updated this revision to Diff 4266.Nov 18 2017, 8:32 PM

contextdiff

ffffffff marked an inline comment as done.Nov 21 2017, 6:55 AM
ffffffff added inline comments.
binaries/data/mods/public/gui/common/global.js
6

it was ingame but i ommit

binaries/data/mods/public/gui/options/options.xml
13–15

good idea shift+s? alt+ctrl+s may already been hotkeyed

mapkoc added a subscriber: mapkoc.Dec 22 2017, 4:54 AM

O + drag is already a hotkey for selecting wounded units (not implemented i think)

elexis added inline comments.Dec 22 2017, 12:23 PM
binaries/data/mods/public/gui/common/global.js
7

Not a fan of adding global files with 7 lines.

Can't we just overwrite the hotkey in the options dialog?

binaries/data/mods/public/gui/common/global.xml
7

Not needed is it, all GUI pages likely include the common directory?

binaries/data/mods/public/gui/page_replaymenu.xml
11

I think this inclusion is missing independently right? No FPS counter otherwise, right?

ffffffff marked an inline comment as done.Dec 23 2017, 4:40 PM

Yo. Got better idea. We abandon this diff almost - we strip this to the gui where we want options gui available like in D1055 and D1154, as they make options in lobby and gamesetup with buttons available, which are the main two GUIs where it's missing.
Also hotkey to mainmenu and ingame ofc.

binaries/data/mods/public/gui/page_replaymenu.xml
11

Indeed. True. :)

ffffffff updated this revision to Diff 4904.Dec 23 2017, 4:42 PM
ffffffff retitled this revision from Make Options Dialog globaly toggleable to Make Options Dialog hotkey toggleable in gamesetup, lobby, mainmenu and ingame.

Options available in gamesetup, lobby, mainmenu and ingame as hotkey ALT + O, which doesnt interfere for me with any other hotkey :).

bb added a comment.Dec 26 2017, 2:34 PM

Why limit the hotkey for gamesetup, options, session and mainmenu only? I think adding the hotkey to global.xml would work already, so we end up with even shorter code and less duplication...

Feature and hotkey choice seems nice

binaries/data/mods/public/gui/common/functions_global_object.js
8 ↗(On Diff #4904)

Identifier whether the Options window is shown

binaries/data/mods/public/gui/gamesetup/gamesetup.xml
9 ↗(On Diff #4904)

semicolon

binaries/data/mods/public/gui/lobby/lobby.xml
9 ↗(On Diff #4904)

same and etc.

binaries/data/mods/public/gui/manual/intro.txt
52

period

binaries/data/mods/public/gui/options/options.js
379–385

a save and close thing is good but the "no" should be kept too, (It could be more clear to the user what the save button actually does, but out of scope I guess)

ffffffff updated this revision to Diff 4962.Dec 26 2017, 5:39 PM

Central code hotkey.

Yea true. I feel it's rather strange having options gui opened, when hitting hotkey, when in replay menu f.e. or when in structure tree or in history ui. Feeling best, when there is a button for options anyway, where it can be opened.
This is in gamesetup, lobby, mainmenu and ingame. : )

This hotkey could also be accidently hitted. : )

binaries/data/config/default.cfg
151–153

L153 is the same hotkey.toggle as before summary.toggle we had named. Actualy this comes from console.toggle L162. So hotkey.toggle name is ok?

binaries/data/mods/public/gui/common/functions_global_object.js
10 ↗(On Diff #4962)

Can the variable be definitioned down right before the function? Or must it be here in head. : )

bb added inline comments.Dec 26 2017, 10:55 PM
binaries/data/mods/public/gui/common/functions_global_object.js
10 ↗(On Diff #4962)

must be in head

171 ↗(On Diff #4962)

function even more ugly than the setting in xml

binaries/data/mods/public/gui/common/global.xml
21

oggle"/> (no whitespace)

ffffffff updated this revision to Diff 5039.Jan 2 2018, 5:43 PM

xml style hotkey
option category tab directly openable on init