add style guide for gui_skinned()
parent
3ed712c8b5
commit
d4d6a14694
|
@ -3337,7 +3337,7 @@ typedef struct skinned_t {
|
|||
atlas_t atlas;
|
||||
float scale;
|
||||
} skinned_t;
|
||||
guiskin_t gui_skinned(const char *inifile, float scale);
|
||||
guiskin_t gui_skinned(const char *asefile, float scale);
|
||||
void* thread( int (*thread_func)(void* user_data), void* user_data );
|
||||
void thread_destroy( void *thd );
|
||||
int argc();
|
||||
|
|
|
@ -18146,12 +18146,30 @@ API void gui_popskin();
|
|||
// default renderers
|
||||
|
||||
/// skinned
|
||||
/* The skinning engine depends on an Aseprite asset with slices set up.
|
||||
While you can specify your own skins for various GUI widgets, some
|
||||
skin variants are hardcoded and expected to be present in your asset:
|
||||
|
||||
gui_panel():
|
||||
- "panel" (overridable)
|
||||
gui_button():
|
||||
- "button" (base overridable)
|
||||
- "_hover" (ex. "scarybtn_hover")
|
||||
- "_press"
|
||||
gui_rect():
|
||||
- no defaults, always pass your own skin/slice name
|
||||
gui_slider():
|
||||
- "slider" (overridable)
|
||||
- "slider_cursor" (partially overridable, ex. "bigslider_cursor")
|
||||
- "_hover" (ex. "slider_cursor_hover")
|
||||
- "_press"
|
||||
*/
|
||||
typedef struct skinned_t {
|
||||
atlas_t atlas;
|
||||
float scale;
|
||||
} skinned_t;
|
||||
|
||||
API guiskin_t gui_skinned(const char *inifile, float scale);
|
||||
API guiskin_t gui_skinned(const char *asefile, float scale);
|
||||
#line 0
|
||||
|
||||
#line 1 "v4k_system.h"
|
||||
|
@ -359237,9 +359255,9 @@ void skinned_getscissorrect(void* userdata, const char *skin, vec4 rect, vec4 *d
|
|||
dims->w -= (skinsize.y - coresize.y);
|
||||
}
|
||||
|
||||
guiskin_t gui_skinned(const char *inifile, float scale) {
|
||||
guiskin_t gui_skinned(const char *asefile, float scale) {
|
||||
skinned_t *a = REALLOC(0, sizeof(skinned_t));
|
||||
a->atlas = atlas_create(inifile, 0);
|
||||
a->atlas = atlas_create(asefile, 0);
|
||||
a->scale = scale?scale:1.0f;
|
||||
guiskin_t skin={0};
|
||||
skin.userdata = a;
|
||||
|
|
|
@ -392,9 +392,9 @@ void skinned_getscissorrect(void* userdata, const char *skin, vec4 rect, vec4 *d
|
|||
dims->w -= (skinsize.y - coresize.y);
|
||||
}
|
||||
|
||||
guiskin_t gui_skinned(const char *inifile, float scale) {
|
||||
guiskin_t gui_skinned(const char *asefile, float scale) {
|
||||
skinned_t *a = REALLOC(0, sizeof(skinned_t));
|
||||
a->atlas = atlas_create(inifile, 0);
|
||||
a->atlas = atlas_create(asefile, 0);
|
||||
a->scale = scale?scale:1.0f;
|
||||
guiskin_t skin={0};
|
||||
skin.userdata = a;
|
||||
|
|
|
@ -31,9 +31,27 @@ API void gui_popskin();
|
|||
// default renderers
|
||||
|
||||
/// skinned
|
||||
/* The skinning engine depends on an Aseprite asset with slices set up.
|
||||
While you can specify your own skins for various GUI widgets, some
|
||||
skin variants are hardcoded and expected to be present in your asset:
|
||||
|
||||
gui_panel():
|
||||
- "panel" (overridable)
|
||||
gui_button():
|
||||
- "button" (base overridable)
|
||||
- "_hover" (ex. "scarybtn_hover")
|
||||
- "_press"
|
||||
gui_rect():
|
||||
- no defaults, always pass your own skin/slice name
|
||||
gui_slider():
|
||||
- "slider" (overridable)
|
||||
- "slider_cursor" (partially overridable, ex. "bigslider_cursor")
|
||||
- "_hover" (ex. "slider_cursor_hover")
|
||||
- "_press"
|
||||
*/
|
||||
typedef struct skinned_t {
|
||||
atlas_t atlas;
|
||||
float scale;
|
||||
} skinned_t;
|
||||
|
||||
API guiskin_t gui_skinned(const char *inifile, float scale);
|
||||
API guiskin_t gui_skinned(const char *asefile, float scale);
|
||||
|
|
|
@ -11402,9 +11402,9 @@ void skinned_getscissorrect(void* userdata, const char *skin, vec4 rect, vec4 *d
|
|||
dims->w -= (skinsize.y - coresize.y);
|
||||
}
|
||||
|
||||
guiskin_t gui_skinned(const char *inifile, float scale) {
|
||||
guiskin_t gui_skinned(const char *asefile, float scale) {
|
||||
skinned_t *a = REALLOC(0, sizeof(skinned_t));
|
||||
a->atlas = atlas_create(inifile, 0);
|
||||
a->atlas = atlas_create(asefile, 0);
|
||||
a->scale = scale?scale:1.0f;
|
||||
guiskin_t skin={0};
|
||||
skin.userdata = a;
|
||||
|
|
20
engine/v4k.h
20
engine/v4k.h
|
@ -4213,12 +4213,30 @@ API void gui_popskin();
|
|||
// default renderers
|
||||
|
||||
/// skinned
|
||||
/* The skinning engine depends on an Aseprite asset with slices set up.
|
||||
While you can specify your own skins for various GUI widgets, some
|
||||
skin variants are hardcoded and expected to be present in your asset:
|
||||
|
||||
gui_panel():
|
||||
- "panel" (overridable)
|
||||
gui_button():
|
||||
- "button" (base overridable)
|
||||
- "_hover" (ex. "scarybtn_hover")
|
||||
- "_press"
|
||||
gui_rect():
|
||||
- no defaults, always pass your own skin/slice name
|
||||
gui_slider():
|
||||
- "slider" (overridable)
|
||||
- "slider_cursor" (partially overridable, ex. "bigslider_cursor")
|
||||
- "_hover" (ex. "slider_cursor_hover")
|
||||
- "_press"
|
||||
*/
|
||||
typedef struct skinned_t {
|
||||
atlas_t atlas;
|
||||
float scale;
|
||||
} skinned_t;
|
||||
|
||||
API guiskin_t gui_skinned(const char *inifile, float scale);
|
||||
API guiskin_t gui_skinned(const char *asefile, float scale);
|
||||
#line 0
|
||||
|
||||
#line 1 "v4k_system.h"
|
||||
|
|
Loading…
Reference in New Issue