Skip to content

sco_ui_v1.set_badge

Sets the short text the product shows beside the tab title (“3”, “new”; at most 15 bytes); NULL or “” clears it. SCO_NOT_FOUND: this plugin has no tab by that id.

sco_result (*)(sco_plugin *, const char *, const char *)

Service index

Property Value
Symbol sco_ui_v1.set_badge
Record ID sco-ui-v1-set-badge
Service sco.ui
Table sco_ui_v1
Version macro SCO_UI_VERSION_1_0
Packed table version 65536
Since / availability size >= 32; 1.0
Complete member extent (x64 bytes) 32
Table size (x64 bytes) 80

Header source

sco_result (*set_badge)(sco_plugin* self, const char* tab_id, const char* text);
Sets the short text the product shows beside the tab title (“3”, “new”; at most 15 bytes); NULL or “” clears it. SCO_NOT_FOUND: this plugin has no tab by that id.

Absent table: query_service NOT_FOUND; stopped self-taking methods: UNAVAILABLE; invalid/released self: BAD_ARG; allocation exceptions: TOO_MANY. Additional failures/output state unspecified unless described in the buffer contract.

Absent table: query_service NOT_FOUND

Strings/arguments copied; draw/ctx borrowed until unregister/unload. Host owns registry; no allocation transfer.

Any thread; draw callbacks game thread. Other recursive reentrancy unspecified.

draw callbacks game thread.

unspecified

No in-flight cancellation API; unregister/unbind removes registration; ordinary unload/non-retained crash cleanup withdraws all UI. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls. Guarded draws stop, but snapshots and chord reservations remain.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sco_ui.h
(*set_badge)
cpp typed-wrapper include/scosdk/ui.hpp
return detail::CanCall(t_, &sco_ui_v1::set_badge) ? t_->set_badge(self_, tabId, text) : SCO_UNAVAILABLE;
csharp typed-wrapper sdk/csharp/Sco.Sdk/Ui.cs
return _t->set_badge(Self, i, t);
lua unsupported docs/ui.md
Scripts bind hotkeys; tabs and overlays need draw callbacks from Lua

None identified in the catalogue; this is not proof none can exist.

ABI pins prove layout, not semantic behavior or a live game session.