Skip to content

Commit f4daeff

Browse files
update api.json
1 parent 7883149 commit f4daeff

File tree

3 files changed

+135
-28
lines changed

3 files changed

+135
-28
lines changed

doc/mkdocs/mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ nav:
3838
- GLES Surface: 'api/Graphics/GLES Surface.md'
3939
- UI: 'api/UI.md'
4040
- UI Core: 'api/UI Core.md'
41-
- UI Core: 'api/UI Core.md'
41+
- UI Widgets: 'api/UI Widgets.md'
4242

4343
- Developer Guide:
4444
- Building: 'building.md'

src/api.json

+134-24
Original file line numberDiff line numberDiff line change
@@ -13209,6 +13209,57 @@
1320913209
}
1321013210
]
1321113211
},
13212+
{
13213+
"kind": "proc",
13214+
"name": "oc_ui_set_draw_proc",
13215+
"return": {
13216+
"kind": "void"
13217+
},
13218+
"params": [
13219+
{
13220+
"name": "proc",
13221+
"type": {
13222+
"kind": "namedType",
13223+
"name": "oc_ui_box_draw_proc"
13224+
}
13225+
},
13226+
{
13227+
"name": "data",
13228+
"type": {
13229+
"kind": "pointer",
13230+
"type": {
13231+
"kind": "void"
13232+
}
13233+
}
13234+
}
13235+
]
13236+
},
13237+
{
13238+
"kind": "proc",
13239+
"name": "oc_ui_box_set_text",
13240+
"return": {
13241+
"kind": "void"
13242+
},
13243+
"params": [
13244+
{
13245+
"name": "box",
13246+
"type": {
13247+
"kind": "pointer",
13248+
"type": {
13249+
"kind": "namedType",
13250+
"name": "oc_ui_box"
13251+
}
13252+
}
13253+
},
13254+
{
13255+
"name": "text",
13256+
"type": {
13257+
"kind": "namedType",
13258+
"name": "oc_str8"
13259+
}
13260+
}
13261+
]
13262+
},
1321213263
{
1321313264
"kind": "proc",
1321413265
"name": "oc_ui_set_text",
@@ -13225,6 +13276,31 @@
1322513276
}
1322613277
]
1322713278
},
13279+
{
13280+
"kind": "proc",
13281+
"name": "oc_ui_box_set_overlay",
13282+
"return": {
13283+
"kind": "void"
13284+
},
13285+
"params": [
13286+
{
13287+
"name": "box",
13288+
"type": {
13289+
"kind": "pointer",
13290+
"type": {
13291+
"kind": "namedType",
13292+
"name": "oc_ui_box"
13293+
}
13294+
}
13295+
},
13296+
{
13297+
"name": "overlay",
13298+
"type": {
13299+
"kind": "bool"
13300+
}
13301+
}
13302+
]
13303+
},
1322813304
{
1322913305
"kind": "proc",
1323013306
"name": "oc_ui_set_overlay",
@@ -13242,7 +13318,7 @@
1324213318
},
1324313319
{
1324413320
"kind": "proc",
13245-
"name": "oc_ui_box_closed",
13321+
"name": "oc_ui_box_is_closed",
1324613322
"return": {
1324713323
"kind": "bool"
1324813324
},
@@ -13286,7 +13362,7 @@
1328613362
},
1328713363
{
1328813364
"kind": "proc",
13289-
"name": "oc_ui_box_active",
13365+
"name": "oc_ui_box_is_active",
1329013366
"return": {
1329113367
"kind": "bool"
1329213368
},
@@ -13330,7 +13406,7 @@
1333013406
},
1333113407
{
1333213408
"kind": "proc",
13333-
"name": "oc_ui_box_hot",
13409+
"name": "oc_ui_box_is_hot",
1333413410
"return": {
1333513411
"kind": "bool"
1333613412
},
@@ -13374,9 +13450,10 @@
1337413450
},
1337513451
{
1337613452
"kind": "proc",
13377-
"name": "oc_ui_box_focus",
13453+
"name": "oc_ui_box_get_sig",
1337813454
"return": {
13379-
"kind": "bool"
13455+
"kind": "namedType",
13456+
"name": "oc_ui_sig"
1338013457
},
1338113458
"params": [
1338213459
{
@@ -13393,23 +13470,44 @@
1339313470
},
1339413471
{
1339513472
"kind": "proc",
13396-
"name": "oc_ui_box_set_focus",
13473+
"name": "oc_ui_is_closed",
13474+
"return": {
13475+
"kind": "bool"
13476+
},
13477+
"params": []
13478+
},
13479+
{
13480+
"kind": "proc",
13481+
"name": "oc_ui_set_closed",
1339713482
"return": {
1339813483
"kind": "void"
1339913484
},
1340013485
"params": [
1340113486
{
13402-
"name": "box",
13487+
"name": "closed",
1340313488
"type": {
13404-
"kind": "pointer",
13405-
"type": {
13406-
"kind": "namedType",
13407-
"name": "oc_ui_box"
13408-
}
13489+
"kind": "bool"
1340913490
}
13410-
},
13491+
}
13492+
]
13493+
},
13494+
{
13495+
"kind": "proc",
13496+
"name": "oc_ui_is_active",
13497+
"return": {
13498+
"kind": "bool"
13499+
},
13500+
"params": []
13501+
},
13502+
{
13503+
"kind": "proc",
13504+
"name": "oc_ui_set_active",
13505+
"return": {
13506+
"kind": "void"
13507+
},
13508+
"params": [
1341113509
{
13412-
"name": "focus",
13510+
"name": "active",
1341313511
"type": {
1341413512
"kind": "bool"
1341513513
}
@@ -13418,27 +13516,39 @@
1341813516
},
1341913517
{
1342013518
"kind": "proc",
13421-
"name": "oc_ui_box_sig",
13519+
"name": "oc_ui_is_hot",
1342213520
"return": {
13423-
"kind": "namedType",
13424-
"name": "oc_ui_sig"
13521+
"kind": "bool"
13522+
},
13523+
"params": []
13524+
},
13525+
{
13526+
"kind": "proc",
13527+
"name": "oc_ui_set_hot",
13528+
"return": {
13529+
"kind": "void"
1342513530
},
1342613531
"params": [
1342713532
{
13428-
"name": "box",
13533+
"name": "hot",
1342913534
"type": {
13430-
"kind": "pointer",
13431-
"type": {
13432-
"kind": "namedType",
13433-
"name": "oc_ui_box"
13434-
}
13535+
"kind": "bool"
1343513536
}
1343613537
}
1343713538
]
1343813539
},
1343913540
{
1344013541
"kind": "proc",
13441-
"name": "oc_ui_tag_box_str8",
13542+
"name": "oc_ui_get_sig",
13543+
"return": {
13544+
"kind": "namedType",
13545+
"name": "oc_ui_sig"
13546+
},
13547+
"params": []
13548+
},
13549+
{
13550+
"kind": "proc",
13551+
"name": "oc_ui_box_tag_str8",
1344213552
"return": {
1344313553
"kind": "void"
1344413554
},

src/ui/widgets.c

-3
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,6 @@ oc_ui_box* oc_ui_slider_str8(oc_str8 name, f32* value)
200200
{
201201
oc_ui_tag("slider");
202202

203-
oc_ui_style_set_f32(OC_UI_BORDER_SIZE, 1);
204-
oc_ui_style_set_color(OC_UI_BORDER_COLOR, (oc_color){ 1, 0, 0, 1 });
205-
206203
//NOTE: default size:
207204
oc_ui_style_set_size(OC_UI_WIDTH, (oc_ui_size){ OC_UI_SIZE_PIXELS, 100 });
208205
oc_ui_style_set_size(OC_UI_HEIGHT, (oc_ui_size){ OC_UI_SIZE_PIXELS, 24 });

0 commit comments

Comments
 (0)