Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_ui_wrappers.h
Go to the documentation of this file.
1#ifndef UI_WRAPPERS_H
2#define UI_WRAPPERS_H
3
4#if defined(__GNUC__) || defined(__clang__)
5#define LOG_PRINTF_FMT(fmt_idx, arg_idx) __attribute__((format(printf, fmt_idx, arg_idx)))
6#else
7#define LOG_PRINTF_FMT(fmt_idx, arg_idx)
8#endif
9
10#include "../../api/sfsf.h"
11#include "../../asi/sf_asi.h"
12
13void __thiscall SFStringConstructor(SF_String *_this);
14SF_String * __thiscall SFStringConstructor_char(SF_String *_this, const char *char_string);
15void __thiscall updateLabelText(CMnuLabel *label, const char *text);
16void __thiscall show_mod_list(CMnuSmpButton *button);
17
25
27void wrap_text(const char *input, char *output, size_t max_width);
28
33void set_centred_label_text(CMnuLabel *label, const char *text, int panel_width,
34 int y, int height);
35
37void apply_label_colour(CMnuLabel *label, float red, float green, float blue);
38CMnuLabel* __thiscall attachLabel(CMnuLabel *label_ptr, CMnuContainer *parent,
39 char *label_chars, uint8_t font_index,
40 uint16_t x_pos, uint16_t y_pos,
41 uint16_t width, uint16_t height);
42
43CMnuLabel* __thiscall attachMeshedLabel(CMnuLabel *new_label,
44 CMnuContainer *parent,
45 char *mesh_char,
46 char *label_char,
47 uint8_t font_index,
48 uint16_t x_pos, uint16_t y_pos,
49 uint16_t width, uint16_t height);
50
52 char *button_mesh_default,
53 char *button_mesh_pressed,
54 char *button_initial_load_mesh,
55 char *button_mesh_disabled, char *label_char,
56 uint8_t font_index, uint16_t x_pos,
57 uint16_t y_pos, uint16_t width,
58 uint16_t height, int button_index,
59 uint32_t callback_func_ptr);
60
62 uint16_t x,
63 uint16_t y,
64 uint16_t width,
65 uint16_t height,
66 const char *background_msb,
67 const char *border_msb,
68 float alpha
69 );
70
71#endif
CMnuLabel *__thiscall attachMeshedLabel(CMnuLabel *new_label, CMnuContainer *parent, char *mesh_char, char *label_char, uint8_t font_index, uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height)
void reset_mod_list_screen()
Forgets the cached mod list screen so the next open rebuilds it.
void __thiscall updateLabelText(CMnuLabel *label, const char *text)
void __thiscall show_mod_list(CMnuSmpButton *button)
void wrap_text(const char *input, char *output, size_t max_width)
Wraps text to a character width, inserting newlines.
void apply_label_colour(CMnuLabel *label, float red, float green, float blue)
Sets a label's normal and highlight colours in one call.
void set_centred_label_text(CMnuLabel *label, const char *text, int panel_width, int y, int height)
Repositions a label so its widest line sits centred in panel_width, then sets its text....
SF_String *__thiscall SFStringConstructor_char(SF_String *_this, const char *char_string)
Constructs an SF_String from a null-terminated char string. Moved here from sf_vanilla_fix_hook....
CMnuContainer *__thiscall createContainer(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const char *background_msb, const char *border_msb, float alpha)
CMnuLabel *__thiscall attachLabel(CMnuLabel *label_ptr, CMnuContainer *parent, char *label_chars, uint8_t font_index, uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height)
CMnuSmpButton *__thiscall attachNewButton(CMnuContainer *parent, char *button_mesh_default, char *button_mesh_pressed, char *button_initial_load_mesh, char *button_mesh_disabled, char *label_char, uint8_t font_index, uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height, int button_index, uint32_t callback_func_ptr)
void __thiscall SFStringConstructor(SF_String *_this)
Zero-initializes an SF_String (no allocation). Moved here from sf_vanilla_fix_hook....