RobLoach / RobLoach/nuklear_console

Any way to set the active parent outside of draw/callbacks?

Open
#127 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
22
Forks
4
Avg merge
4m
Merged PRs (30d)
2

Description

I have a custom binds menu I'm working on, and in another part of the loop, I'm listening for the player's input, and then setting the keybind, then trying to return the player back to the "configure binds" menu, with a call to nk_console_set_active_parent after refreshing the menu's contents, but it's getting an assertion failure, that the context isn't current. I just want to be able to set the menu we're in from outside of the render loop somehow.

It seems to remember what menu it's in between draw calls, so there must be some way to do this, right?

Seems to assert in nk_window_set_scroll, so maybe there could be some kind of check here to not try to do this if we're not currently in the draw loop?

If I ignore the assert, it seems to work perfectly fine, but I'm guessing that assert is there for a reason.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing nk_console_set_active_parent and the assertion in nk_window_set_scroll, comparing calls made inside draw/callbacks with the reported call from the input loop. Determine the supported behavior for changing the active menu outside the render loop and document or implement a safe, tested path if the project can define one.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.