mirror of https://github.com/inolen/redream.git
center text for debug menu options
This commit is contained in:
parent
78cf487c19
commit
dd58ef3b5c
|
@ -469,7 +469,8 @@ static void emu_paint(struct emu *emu) {
|
|||
|
||||
/* add our own debug menu */
|
||||
nk_layout_row_push(ctx, 50.0f);
|
||||
if (nk_menu_begin_label(ctx, "DEBUG", NK_TEXT_LEFT,
|
||||
|
||||
if (nk_menu_begin_label(ctx, "DEBUG", NK_TEXT_CENTERED,
|
||||
nk_vec2(160.0f, 200.0f))) {
|
||||
nk_layout_row_dynamic(ctx, DEBUG_MENU_HEIGHT, 1);
|
||||
|
||||
|
@ -503,9 +504,10 @@ static void emu_paint(struct emu *emu) {
|
|||
snprintf(status, sizeof(status), "FPS %3d RPS %3d VBS %3d SH4 %4d ARM %d",
|
||||
frames, ta_renders, pvr_vblanks, sh4_instrs, arm7_instrs);
|
||||
|
||||
int remaining_width = ctx->current->layout->bounds.w -
|
||||
ctx->current->layout->row.item_offset -
|
||||
ctx->style.window.spacing.x * 4.0f;
|
||||
int remaining_width =
|
||||
ctx->current->layout->bounds.w -
|
||||
ctx->current->layout->row.item_offset -
|
||||
ctx->current->layout->row.index * ctx->style.window.spacing.x - 4.0f;
|
||||
nk_layout_row_push(ctx, remaining_width);
|
||||
nk_label(ctx, status, NK_TEXT_RIGHT);
|
||||
|
||||
|
|
|
@ -798,7 +798,8 @@ static void aica_debug_menu(struct device *dev, struct nk_context *ctx) {
|
|||
|
||||
nk_layout_row_push(ctx, 40.0f);
|
||||
|
||||
if (nk_menu_begin_label(ctx, "AICA", NK_TEXT_LEFT, nk_vec2(140.0f, 200.0f))) {
|
||||
if (nk_menu_begin_label(ctx, "AICA", NK_TEXT_CENTERED,
|
||||
nk_vec2(140.0f, 200.0f))) {
|
||||
nk_layout_row_dynamic(ctx, DEBUG_MENU_HEIGHT, 1);
|
||||
|
||||
if (!aica->recording && nk_button_label(ctx, "start recording")) {
|
||||
|
|
|
@ -323,9 +323,9 @@ void holly_raise_interrupt(struct holly *hl, holly_interrupt_t intr) {
|
|||
static void holly_debug_menu(struct device *dev, struct nk_context *ctx) {
|
||||
struct holly *hl = (struct holly *)dev;
|
||||
|
||||
nk_layout_row_push(ctx, 44.0f);
|
||||
nk_layout_row_push(ctx, 50.0f);
|
||||
|
||||
if (nk_menu_begin_label(ctx, "HOLLY", NK_TEXT_LEFT,
|
||||
if (nk_menu_begin_label(ctx, "HOLLY", NK_TEXT_CENTERED,
|
||||
nk_vec2(200.0f, 200.0f))) {
|
||||
nk_layout_row_dynamic(ctx, DEBUG_MENU_HEIGHT, 1);
|
||||
|
||||
|
|
|
@ -158,7 +158,8 @@ static void sh4_debug_menu(struct device *dev, struct nk_context *ctx) {
|
|||
|
||||
nk_layout_row_push(ctx, 30.0f);
|
||||
|
||||
if (nk_menu_begin_label(ctx, "SH4", NK_TEXT_LEFT, nk_vec2(200.0f, 200.0f))) {
|
||||
if (nk_menu_begin_label(ctx, "SH4", NK_TEXT_CENTERED,
|
||||
nk_vec2(200.0f, 200.0f))) {
|
||||
nk_layout_row_dynamic(ctx, DEBUG_MENU_HEIGHT, 1);
|
||||
|
||||
if (nk_button_label(ctx, "clear cache")) {
|
||||
|
|
Loading…
Reference in New Issue