mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Add djui_menu_get_font
This commit is contained in:
parent
8a5a23a8a6
commit
20d2e3de6b
6 changed files with 50 additions and 8 deletions
|
@ -8144,6 +8144,11 @@ function djui_is_popup_disabled()
|
|||
-- ...
|
||||
end
|
||||
|
||||
--- @return DjuiFontType
|
||||
function djui_menu_get_font()
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param message string
|
||||
--- @param lines integer
|
||||
function djui_popup_create_global(message, lines)
|
||||
|
|
|
@ -1989,6 +1989,24 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [djui_menu_get_font](#djui_menu_get_font)
|
||||
|
||||
### Lua Example
|
||||
`local enumValue = djui_menu_get_font()`
|
||||
|
||||
### Parameters
|
||||
- None
|
||||
|
||||
### Returns
|
||||
[enum DjuiFontType](constants.md#enum-DjuiFontType)
|
||||
|
||||
### C Prototype
|
||||
`enum DjuiFontType djui_menu_get_font(void);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [djui_popup_create_global](#djui_popup_create_global)
|
||||
|
||||
### Lua Example
|
||||
|
|
|
@ -1709,6 +1709,7 @@
|
|||
- [deref_s32_pointer](functions-5.md#deref_s32_pointer)
|
||||
- [djui_is_playerlist_open](functions-5.md#djui_is_playerlist_open)
|
||||
- [djui_is_popup_disabled](functions-5.md#djui_is_popup_disabled)
|
||||
- [djui_menu_get_font](functions-5.md#djui_menu_get_font)
|
||||
- [djui_popup_create_global](functions-5.md#djui_popup_create_global)
|
||||
- [djui_reset_popup_disabled_override](functions-5.md#djui_reset_popup_disabled_override)
|
||||
- [djui_set_popup_disabled_override](functions-5.md#djui_set_popup_disabled_override)
|
||||
|
|
|
@ -30042,6 +30042,21 @@ int smlua_func_djui_is_popup_disabled(UNUSED lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_djui_menu_get_font(UNUSED lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
int top = lua_gettop(L);
|
||||
if (top != 0) {
|
||||
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_menu_get_font", 0, top);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
lua_pushinteger(L, djui_menu_get_font());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_djui_popup_create_global(lua_State* L) {
|
||||
if (L == NULL) { return 0; }
|
||||
|
||||
|
@ -34470,6 +34485,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "deref_s32_pointer", smlua_func_deref_s32_pointer);
|
||||
smlua_bind_function(L, "djui_is_playerlist_open", smlua_func_djui_is_playerlist_open);
|
||||
smlua_bind_function(L, "djui_is_popup_disabled", smlua_func_djui_is_popup_disabled);
|
||||
smlua_bind_function(L, "djui_menu_get_font", smlua_func_djui_menu_get_font);
|
||||
smlua_bind_function(L, "djui_popup_create_global", smlua_func_djui_popup_create_global);
|
||||
smlua_bind_function(L, "djui_reset_popup_disabled_override", smlua_func_djui_reset_popup_disabled_override);
|
||||
smlua_bind_function(L, "djui_set_popup_disabled_override", smlua_func_djui_set_popup_disabled_override);
|
||||
|
|
|
@ -86,6 +86,14 @@ void djui_reset_popup_disabled_override(void) {
|
|||
sAllowDjuiPopupOverride.override = false;
|
||||
}
|
||||
|
||||
bool djui_is_playerlist_open(void) {
|
||||
return gDjuiPlayerList->base.visible;
|
||||
}
|
||||
|
||||
enum DjuiFontType djui_menu_get_font(void) {
|
||||
return configDjuiThemeFont == 0 ? FONT_NORMAL : FONT_ALIASED;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
extern s8 gDialogBoxState;
|
||||
|
@ -403,12 +411,6 @@ s32 get_dialog_response(void) {
|
|||
|
||||
///
|
||||
|
||||
bool djui_is_playerlist_open(void) {
|
||||
return gDjuiPlayerList->base.visible;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
const char* get_local_discord_id(void) {
|
||||
#ifdef DISCORD_SDK
|
||||
static char sDiscordId[64] = "";
|
||||
|
|
|
@ -49,6 +49,8 @@ void djui_popup_create_global(const char* message, int lines);
|
|||
bool djui_is_popup_disabled(void);
|
||||
void djui_set_popup_disabled_override(bool value);
|
||||
void djui_reset_popup_disabled_override(void);
|
||||
bool djui_is_playerlist_open(void);
|
||||
enum DjuiFontType djui_menu_get_font(void);
|
||||
|
||||
s8 get_dialog_box_state(void);
|
||||
s16 get_dialog_id(void);
|
||||
|
@ -108,8 +110,6 @@ u32 get_global_timer(void);
|
|||
|
||||
s32 get_dialog_response(void);
|
||||
|
||||
bool djui_is_playerlist_open(void);
|
||||
|
||||
const char* get_local_discord_id(void);
|
||||
|
||||
f32 get_volume_master(void);
|
||||
|
|
Loading…
Reference in a new issue