150 Commits
Author SHA1 Message Date
mjn-mixael 8efe146300 save player after changing campaign in scpui 2023-09-09 23:01:59 -05:00
mjn-mixael 52b7a3d198 rank display name and title 2023-09-09 10:54:04 -05:00
Goober5000 6a550a6701 additional music checks
This adds several fixes to make the event and menu music more robust:
1. The game will now run with zero soundtracks.  All accesses into a potentially empty vector should now have checks.
2. Soundtracks and menu music are now checked for validity before being played (not just when importing a FSM mission).
3. The parsing validity checks and the in-game event music now check for skippable patterns using the same function.
4. Zero measures and zero samples-per-measure now cause the game to skip a pattern.  Negative values now trigger a warning.
5. Omitting some or all of the `$Name:` lines for a soundtrack will not cause an assert.

Fixes #5576.  Follow-up to #5572.
2023-08-25 19:22:03 -04:00
mjn-mixael 9a7500de36 lua method to launch arbitrary url 2023-08-13 09:27:30 -05:00
Goober5000 17d36156cb add const where appropriate to the modelrender API
See title.  There were some cascade effects, but the changes are mostly contained to the model code.  The calls to `gr_render_model` and `g3_render_primitives` use `const_cast` because constifying that API would require a whole other PR.
2023-06-18 14:05:46 -04:00
mjn-mixael eafab41823 unify language and capitolization 2023-04-17 14:50:38 -05:00
mjn-mixael f5a08bb694 change api description to finalize 2023-04-17 08:53:52 -05:00
mjn-mixael da7d9f28b9 global to param 2023-04-17 08:53:26 -05:00
Mike Nelson 108def6224 Scpui Hud Config API (#5302)
* initial API for hud config elements

* get rendering, highlighting, and selecting working

* Add a way to create color objects

* some cleanup and fixes

* go away we dont need you

* allow arbitrarily scaling the hud config draw

* last few config options and innitial preset handling

* vectorize hud presets and setup handling

* some last minute fixes

* iiiiiiiiiiiiiiiiiiiiiiint

* really

* documentation and address feedback

* completely revert this as well

* more documentation

* document all the things

* comment out unused parameter

* peach emoji retentive

* whatever

* return types

* color
2023-04-16 08:13:06 -04:00
Goober5000 a932dc94c0 Merge pull request #5307 from MjnMixael/explicit_no_wrap
Explicitely do not split lines when making the message log
2023-04-15 14:59:09 -04:00
Goober5000 b7d1270439 convert hotkey types to enum
Here's a suggested followup to #5249.  This converts the hotkey type to an enum for improved type safety.  It also adds the corresponding Lua enums and adjusts the Type virtvar to return them.
2023-04-12 10:55:36 -04:00
Goober5000 10e5875289 add validity checks
Many of the recent scripting API enhancements are missing validity functions and validity checks, so this adds them.  There are also some documentation fixes and a >= vs. > bugfix.
2023-04-12 00:14:20 -04:00
Mike Nelson e01a5359ac Scpui API for Control Config (#5305)
* read access to controls

* Early draft of checking keypresses in scpui

* detangle some code and prepare it for API usage

* API access to the core methods required

* move these checks into the UI methods

* comment

* fix bugs

* be smarter

* Need this stuff, too

* some more presets work

* unify func naming scheme

* cleanup and clarifications

* get detect keypress working

* allow searching and creating new presets based on current controls

* address feedback

* return nil if no preset is matched

* use the builtin methods which do the same thing, but slightly cleaner

* typo
2023-04-07 12:02:13 -04:00
mjn-mixael 80004f2996 explicitely do not split lines 2023-04-02 19:43:53 -05:00
Mike Nelson 85bcfd56e8 force expand wings instead of toggle for scpui (#5286) 2023-03-28 07:40:03 -04:00
mjn-mixael 1fdf8b1756 access to array sizes 2023-03-23 12:52:11 -05:00
mjn-mixael c92d383b69 scpui api for medals access 2023-03-23 11:19:46 -05:00
mjn-mixael 242c7184b8 Merge branch 'master' into scpui_hotkeys
# Conflicts:
#	code/scripting/api/libs/ui.cpp
2023-03-22 09:14:21 -05:00
mjn-mixael 88166d58bc Merge branch 'master' into scpui_hotkeys
# Conflicts:
#	code/scripting/api/libs/ui.cpp
#	code/source_groups.cmake
2023-03-22 08:33:11 -05:00
mjn-mixael 51c55550f0 Merge branch 'master' into scpui_game_help
# Conflicts:
#	code/scripting/api/libs/ui.cpp
2023-03-22 08:25:33 -05:00
Mike Nelson fbf0db09a7 Scpui Mission Log (#5242)
* SCPUI access to scrollback items (mission event log and message log)

* copy paste error

* check the objective flags instead of the action flags now

* rename actions -> segments
2023-03-21 20:03:35 -04:00
mjn-mixael 465190b154 fix some issues based on testing 2023-03-09 16:38:31 -06:00
mjn-mixael aa91e93aa6 copy/paste 2023-03-09 14:36:27 -06:00
mjn-mixael 3e24e21e4d add a dumb 2023-03-09 10:25:36 -06:00
mjn-mixael 92f140c080 add functions 2023-03-09 10:03:37 -06:00
mjn-mixael e105b57a26 read access to mission hotkeys for scpui 2023-03-08 14:23:33 -06:00
mjn-mixael 1d9fa9719c some cleanup 2023-03-06 18:26:19 -06:00
mjn-mixael b2e56dc408 Initial setup of lua access to help sections 2023-03-06 17:33:09 -06:00
Fabian Woltermann c8fd2af450 Merge pull request #5090 from MjnMixael/scpui_closeup_icons
SCPUI methods required for handling closeup briefing icon stuff
2023-03-06 16:36:44 +01:00
Goober5000 89c6d330f8 Merge pull request #5159 from MjnMixael/credits_no_splitting
Prevent line splitting if building credits for SCPUI
2023-02-19 15:10:14 -05:00
Goober5000 6f7f9c2f48 Merge pull request #5120 from MjnMixael/scpui_pause_screen
funcs and virtvars for SCPUI pause screen
2023-02-13 21:45:12 -05:00
mjn-mixael c5ea47fd05 clear credits before rebuilding 2023-02-04 01:26:04 -06:00
mjn-mixael 0ad91aaf3d prevent line splitting if building credits for SCPUI 2023-01-31 16:19:40 -06:00
mjn-mixael 6b097be0a6 use me daddy 2023-01-16 14:15:56 -06:00
mjn-mixael 9980c3f5c5 funcs and virtvars for SCPUI pause screen 2023-01-16 14:02:01 -06:00
mjn-mixael 2881482182 fix rendering of jump nodes 2023-01-07 11:11:02 -06:00
mjn-mixael c6a1639a82 scpui methods required for handling closeup briefing icon stuff 2023-01-07 01:48:39 -06:00
MjnMixael a3bbf13da6 prevent access to goals outside the vector (#5044)
prevent access to goals outside the vector
2022-12-24 21:12:56 -05:00
Goober5000 226e956fcc dynamic events and goals
Make events and goals dynamic in missions and campaigns.  When parsing, initialize all fields to their defaults.
2022-12-09 13:10:39 -05:00
Goober5000 b2f5ea9065 Merge pull request #4764 from MjnMixael/3d_select_settings
3d select settings
2022-11-13 16:13:17 -05:00
mjn-mixael 35e6bc9df0 setup overhead style as a type enum 2022-11-09 09:16:57 -06:00
MjnMixael bff3d433e2 properly get badge name (#4853) 2022-11-05 10:01:44 -04:00
BMagnu d85c1431a4 libRocket Texture Passthrough (#4822)
* Properly handle lua texture refcounting

* Add linkTexture ui method

* Incorporate feedback
2022-11-02 18:25:22 +09:00
MjnMixael 346817f3d0 Further limit what built-in UI elements can be setup when using SCPUI (#4824)
* Further limit what built-in UI elements can be setup when using SCPUI

* remove superfluous declaration
2022-11-01 21:43:14 +09:00
MjnMixael 90c4316a5e Update scpui documentation (#4802)
* Update documentation

* Typo
2022-10-20 19:13:03 +09:00
mjn-mixael 64bd233c49 API to access the new 3d select settings in game_settings.tbl 2022-10-17 09:58:15 -05:00
MjnMixael 6ae8674615 Correctly set credits default even for scpui access (#4768)
* Correctly set credits default even for scpui access

* These also need to move up for the same reason

* Match retail functionality
2022-10-11 16:47:10 +09:00
MjnMixael e30931b6d2 API to save the current loadout to the player file (#4739)
* API to save the current loadout to the player file

* cleanup
2022-10-02 20:23:31 +09:00
MjnMixael ef850ad302 Handle errors from create_wings() in an API friendly way (#4730) 2022-09-30 16:46:45 +09:00
MjnMixael e963cfda93 return the actual number of starting wings (#4728) 2022-09-30 16:44:58 +09:00