Skip to content

Commit

Permalink
Fix #132 menu constant
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Jul 10, 2017
1 parent 8516492 commit 388321f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ manually.
3. Add the line `Pfx\PfxInstFreeAim.d` to the end of `_work\data\Scripts\System\PFX.src`.
4. Add the line `sfx\sfxinstfreeaim.d` to the end of `_work\data\Scripts\System\SFX.src`.
5. Add the line `visualfx\visualfxfreeaim.d` to the end of `_work\data\Scripts\System\VisualFX.src`.
6. Add the line `menu\menu_opt_game_freeaim.d` to the end of `_work\data\Scripts\System\Menu.src`.
6. Add the line `menu\menu_opt_game_freeaim.d` to `_work\data\Scripts\System\Menu.src` between `_intern\menu.d` and
`menu\menu_main.d`
4. Add a new menu entry to the options game menu. Extend the instance `MENU_OPT_GAME` in
`_work\data\Scripts\System\Menu\Menu_Opt_Game.d` with these two lines just before
`items[XX] = "MENUITEM_GAME_BACK";`.
Expand All @@ -84,8 +85,8 @@ manually.
disable free aim from the options menu.
5. In the same file change `posy = MENU_BACK_Y;` in the instance `MENUITEM_GAME_BACK` to `posy = MENU_BACK_Y+300;`.
This repositions the menu entries such that everything fits.
6. Set the constant `MENU_ID_FREEAIM` either in `Menu_Opt_Game.d` or in `Menu_Opt_Game_FreeAim.d` to the next available
slot in the menu, typically `(XX-1)/2`. For example:
6. Set the constant `MENU_ID_FREEAIM` in `Menu_Opt_Game_FreeAim.d` to the next available slot in the menu, typically
`(XX-1)/2`. For example:

```
const int MENU_ID_FREEAIM = 7; // Next available Y-spot in the menu
Expand Down
11 changes: 7 additions & 4 deletions _work/data/Scripts/System/Menu/Menu_Opt_Game_FreeAim.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
* Adjust the item id (MENU_ID_FREEAIM) below to the next available item number and change the labels if needed
*/

//const int MENU_ID_FREEAIM = 7; // Next available Y-spot in the menu
const string MENU_FREEAIM_LABEL = "Freies Zielen"; // "Free aiming"
const string MENU_FREEAIM_CHOICES = "aus|an"; // "off|on"

const int MENU_ID_FREEAIM = 7; // Next available Y-spot in the game menu
const string MENU_FREEAIM_LABEL = "Freies Zielen"; // "Free aiming"
const string MENU_FREEAIM_CHOICES = "aus|an"; // "off|on"
const string MENU_FREEAIM_DESCR = "Erfordert Maus Steuerung"; // "Requires mouse controls"


INSTANCE MENUITEM_OPT_FREEAIM(C_MENU_ITEM_DEF) {
backpic = MENU_ITEM_BACK_PIC;
text[0] = MENU_FREEAIM_LABEL;
Expand All @@ -45,7 +47,8 @@ INSTANCE MENUITEM_OPT_FREEAIM(C_MENU_ITEM_DEF) {
flags = flags | IT_EFFECTS_NEXT;
};

instance MENUITEM_OPT_FREEAIM_CHOICE(C_MENU_ITEM_DEF) {

INSTANCE MENUITEM_OPT_FREEAIM_CHOICE(C_MENU_ITEM_DEF) {
backPic = MENU_CHOICE_BACK_PIC;
type = MENU_ITEM_CHOICEBOX;
text[0] = MENU_FREEAIM_CHOICES;
Expand Down

0 comments on commit 388321f

Please sign in to comment.