Commit Graph
222 Commits
Author SHA1 Message Date
ac-stef f3e72b8fb7 remove gettext
DOCREF gettext
2015-06-10 14:28:50 +02:00
ac-stef d3cdec0708 allow persistent menu selections
menuselectionpersistent
  Enables persistent selections for the currently displayed menu and also
  restores a previously saved selection. Probably most efficient inside
  "menuinit". The position is restored during execution of this command,
  so the menu entry has to already exist and the alias with the last
  position has to be read from saved.cfg. In autmatically created menus
  it may be necessary to execute the command with a short delay (see
  examples in this commit).

DOCREF menuselectionpersistent
2015-06-10 14:22:11 +02:00
ac-stef 4e3c40c3be clean up texture boxes in menus
too many copies of the same few lines...
2015-06-10 14:22:11 +02:00
ac-stef 148719c0f7 add script command for menu items with alternate fonts
Also: add '\a' to the list of escaped characters and remove storage of
  unneeded "filename".

mitemaltfont <altfont> <text> <action> <hoveraction> <desc>
  Displays a menu line with a text which may contain chars from an
  alternate font.

  altfont
    Name of the alternate font.

  text
    Content of menu line. Chars from the alternate font have to be marked
    with "\a". Alternate font chars have no width and are just rendered
    above the following text. Use spaces to counter that.

  action, hoveraction, desc
    Same function as with other menu lines.

DOCREF menuitemaltfont
2015-06-10 14:12:43 +02:00
ac-stef d78002e167 texture preview display for menus
chmenutexture <menu name> <texture path>
  Displays a texture on the right side of a menu.

menutexturesize <size factor>
  Changes the size of textures displayed in menus. Mostly for testing
  purposes.

DOCREF chmenutexture menutexturesize
2015-06-05 16:00:02 +02:00
ac-stef 4b1c4f466f new command menurenderoffset
Moves a menu away from the middle of the screen. Values of "100" represent
half the screen width and height.

  menurenderoffset x-offset y-offset

DOCREF menurenderoffset
2015-06-05 16:00:02 +02:00
ac-stef acb26e23a0 cleanup menus.cpp
Place the command macro near the function body. Makes it easier to keep
command signature and function prototype in sync.
2015-06-05 16:00:01 +02:00
ac-stef ae82b6b22e add attr5..7, add mapmodel pitch and roll
Keys 5, 6 and 7 (in combination with the scrollwheel) can be used to alter
the new entity attributes.

Pressing editmeta (LCTRL by default) speeds up the scrolling.

(Parts of the roll code are borrowed from Alejandro V. Garcia's commit
"Model rotations, experimental" from January 2013)

Note: coop edit is now broken between "next" and older clients, but I
  don't want to bump the protocol just yet.
2015-05-18 14:59:41 +02:00
ac-stef f6f2216f85 keep menu selection during menu rebuild
Not clearing the menu selection in a followup "newmenu" command does not
seem to have negative effects - and keeps the selection.

Initaction ("menuinit") is now executed before the selction focus is set
during menu->open. This avoids old hover commands to be executed before
the menu gets deleted during rebuild.
2015-05-18 14:59:41 +02:00
ac-stef 618d72cdc4 swap execution order of menuinit and item init
Now the command specified by menuinit is executed first, and then the
various menu item init commands (for example getting the value for
menuitemtextinput lines).

This may affect some menu init scripts - but I couldn't find any problems.
It only affects menus which use "menuinit" _and_ menu items with
initialisation.
2015-05-18 14:59:41 +02:00
ac-stef 3b8f642a38 add description entries for scripted menu items
This looks ugly, if the descriptions are long. There should be some kind
of linewrap for descriptions.

DOCREF menuitem
2015-05-17 00:24:39 +02:00
aurhat 4e0e128b16 Fix and improve displaying map message in menu 2015-04-17 17:11:34 +02:00
ac-stef 57a0d286c1 automatic mapmodel menus
auto-generate mapmodel menus depending on the actually available models
in the current map config.

Also fixes memory leak in "newmenu".

DOCREF mapmodelname mapmodelbyname mapmodelchanged
2015-04-12 18:09:36 +02:00
ac-stef f511889731 customisable sort order for file lists in menus 2015-04-12 18:09:36 +02:00
ac-stef fe97817dac use proper delete macro 2015-04-03 21:10:17 +02:00
ac-stef 631685afb6 new commands curmenu and closecurmenu
curmenu gives back the name of the currently open menu, which can be used
to close just that.

The new script "closecurmenu" uses curmenu to close the current menu.

DOCREF curmenu closecurmenu
2015-03-29 13:21:47 +02:00
ac-stef 02869f988a fix keyrepeat
don't disable keyrepeat when going straight from menus to saycommand
2015-02-23 18:52:34 +01:00
ac-stef 78f2bac38d enable keyrepeat in menus
* also fix a memory leak
* fix mitem type TYPE_TEXTINPUT
* the name change from type to mitemtype is of cosmetic nature
2015-02-09 11:56:50 +01:00
aurhat befd22d2e8 Don't hide the sniper rifle scope if scoreboard is enabled
The fix also allows to turn on/off the scope during intermission (since
a few years the scope was blocked in intermission, because it was
immediately turned off by scoreboard).
2015-02-08 23:05:37 +01:00
aurhat fa483e1fcd Add custom description of demos
Custom description is displayed in "Watching demo" and "Play demo" menu.
2014-11-29 16:06:50 +01:00
aurhat b6a5418c24 Add alternative views in serverbrowser and improve favourites
Alternative views in the serverbrowser are implemented with use favourites.
Categories (names) of favourite servers, which will be displayed on the
views, have to be included in "serverbrowseraltviews" alias (accessible
in menu).
Switching between views is possible with use Alt + Mouse wheel and
Alt + Up/Down (or eventually "[" and "]", if they are dedicated keys
on your keyboard).

The commit also:
1. adds MATCH category to favourites;
2. shows category name in settings of favourites;
3. shows weights in serverbrowser instead of favourites image,
when showweights = 1;
4. cleans up some tabs.
2014-11-11 21:07:19 +01:00
aurhat bc3be8136e Revert "unfiltered display of preview"
This reverts commit 5450296879.
I don't know, why the code was changed before, but that caused, that images
in menu weren't transparent, for example image of favourites in
the serverbrowser.
2014-11-02 14:33:47 +01:00
aurhat 4c3176611a Two fixes concerning items selection in menu
The first fixes the last use of menusel, that wasn't checked for range yet.
The second one brings menusel back into range, if there is no
refresh function.
2014-07-05 12:55:15 +02:00
ac-stef 29dd50bde6 fix: keep path and uppercase in demo filenames
votes now distinguish between demo and map votecalls and filter the
filename appropriately

also: remove paths from map names cleanly
2014-05-25 00:35:22 +02:00
ac-stef a0286d2b3f replace textfilter functions with one-fits-all version
* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
2014-05-24 12:59:19 +02:00
ac-stef 0c233458c7 g++ warning fix 2014-01-26 20:22:36 +01:00
Lucas GAUTHERON dc8e503aca show map names instead of map msgs in map list (thanks SKB)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7484 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-05-23 17:51:17 +00:00
Bukz 57daa43a62 new optional argument for menuitemtextinput for masking user input
hide password inputs in menus_multiplayer.cfg

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7461 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-04-17 04:16:25 +00:00
Lucas GAUTHERON c971fe51ce previous keymenu fix extended to other keys
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7336 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-10 01:52:22 +00:00
Lucas GAUTHERON 9cbfd3e99a "Can't bind up/down keys via the menu" bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7334 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-03-10 01:29:36 +00:00
Cristian Vlasceanu d88664ec42 menuitemslider wrap-around and mouse wheel (http://forum.cubers.net/thread-6079-post-122565.html#pid122565).
Wrap around behavior is toggled via "wrapslider" variable (default is off)


git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7262 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-28 08:40:18 +00:00
Bukz 59ada9382d menuitemtextinput onhoveraction bug fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7207 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-15 05:58:28 +00:00
Bukz 9ee184f386 don't playsound S_MENUENTER if menuitem action == -1 (null/blank/text only item)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7197 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2013-02-14 04:59:16 +00:00
aerkefiende 66f8feee3b Replaced every tab with 4 spaces
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6927 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-12 22:28:11 +00:00
aerkefiende 19f4558112 Command line now can use the mouse input as well (thanks to Felix-The-Ghost and SKB)
conskip fix (thanks to SKB)
new windows binaries

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6926 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-11-12 21:53:44 +00:00
sireus b33116712c sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-10-06 22:49:49 +00:00
sireus b2379e90d4 fix possible crash in menudirlist
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6846 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-06-28 21:07:56 +00:00
Bukz e7a233c610 bot survival tweak/menus fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6810 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-05-28 22:02:43 +00:00
Bukz 4aaf1fc74f fix crash if menudirlist gets an empty string for file extensions
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6809 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2012-05-28 20:20:48 +00:00
Lucas GAUTHERON 297f679840 scoreboard fixes/improvements, kick/ban action fixes (wip. TODO: get tks client side)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6639 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-09-04 15:35:15 +00:00
aerkefiende 06f73f4627 Replaced Tabs with 4 spaces in every source file
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6561 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-31 15:44:57 +00:00
sireus e928c8f203 fixed crash in 'all maps' maps menu
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6557 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-07-06 17:42:00 +00:00
Bukz 4847ff00ff onVoteEnd, curautoteam, addpunct, curplayers, delmenu, votepending, and a new test kick/ban menu :)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6422 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-05-13 11:55:57 +00:00
sireus bb978c8e9b show context (e.g. filename) on cubescript errors
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6400 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-04-30 20:27:37 +00:00
flowtron e6ce8cae06 blinking-text disabled by default (general and in menus)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6113 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-28 16:09:51 +00:00
flowtron 7a5c2a23c9 fix mapshots in menu for personal maps
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6102 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2011-02-14 18:03:37 +00:00
flowtron 1a1a9e3aa8 menu-dirlist fix (bug found by Gibstick) and menu-footer line-wrapping added
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5558 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-08-07 22:54:39 +00:00
flowtron ad67963f88 minor tweaks
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5466 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-28 11:25:17 +00:00
RandumKiwi 4bb1e2fd21 Plural makes more sense
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5454 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-24 01:39:47 +00:00
Rafael Barreto 9bc699c27a minimalist scoreboard, docs fix (missing diff line), less points to combo (to make it more reliable with the frag/death relationship in a dm)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5447 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-07-22 21:22:26 +00:00