reworked context state handling
This commit is contained in:
parent
5eb4437ac4
commit
7528ed007e
4 changed files with 28 additions and 30 deletions
|
|
@ -34,13 +34,12 @@ void kubo_bar_render(struct kubo_context *context) {
|
|||
int bar_text_x = 10;
|
||||
|
||||
DrawRectangle(0, bar_y, GetScreenWidth(), KUBO_BAR_HEIGHT, BLACK);
|
||||
bar_text_x =
|
||||
push_text(bar_text_x, bar_y, kubo_context_get_label(context->state),
|
||||
kubo_context_get_color(context->state));
|
||||
bar_text_x = push_text(bar_text_x, bar_y, context->state.label,
|
||||
context->state.color);
|
||||
|
||||
bar_text_x += 2 * KUBO_BAR_PADDING;
|
||||
|
||||
if (context->state == KUBO_CONTEXT_COMMAND) {
|
||||
if (context->state.id == KUBO_CONTEXT_COMMAND) {
|
||||
kubo_command_render(context, bar_text_x, bar_y + (KUBO_BAR_PADDING / 2),
|
||||
KUBO_BAR_HEIGHT - KUBO_BAR_PADDING);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue