Core: registro de metadados de blocos (tb_meta) + testes; metadados declarados nas libraries

This commit is contained in:
mguinhos committed 2026-10-20 22:07:40 -03:00
1 parent 22ae18f508
commit 036162280d
14 files changed
+397 -2

No files matched your search

+18
View File
@@ -70,6 +70,24 @@ static bool pen_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
};
tb_library_set_category(lib, &cat);
/* Metadados dos blocos (tooltip do editor: Alt + hover). */
TB_BLOCK_META("Stage.Clear", "eval_clear",
"Limpa o palco");
TB_BLOCK_META("Stage.Background", "eval_background",
"Define a cor de fundo do palco");
TB_BLOCK_META("Stage.PenColor", "eval_pen_color",
"Define a cor da caneta");
TB_BLOCK_META("Stage.PenSize", "eval_pen_size",
"Define a espessura da caneta");
TB_BLOCK_META("Stage.Line", "eval_line",
"Desenha uma linha entre dois pontos");
TB_BLOCK_META("Stage.Rect", "eval_rect",
"Desenha um retangulo");
TB_BLOCK_META("Stage.Circle", "eval_circle",
"Desenha um circulo");
TB_BLOCK_META("Stage.Text", "eval_text",
"Escreve um texto no palco");
static const TinyBlocks_SlotDesc rgb[] = {{"r", TB_VALUE_REAL}, {"g", TB_VALUE_REAL}, {"b", TB_VALUE_REAL}};
static const TinyBlocks_SlotDesc size[] = {{"tamanho", TB_VALUE_REAL}};
static const TinyBlocks_SlotDesc line[] = {{"x1", TB_VALUE_REAL}, {"y1", TB_VALUE_REAL},