Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Make properties' left and right arrows repeaters; give repeaters adjustable rate & acceleration #785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kg
Copy link

@kg kg commented Dec 18, 2018

This PR makes the left/right arrows on properties repeaters, and changes repeaters so they do not tick every frame. The repeaters instead tick at a configurable interval, and the interval decreases the longer you hold the mouse button.

Change repeaters so that by default they do not tick every frame and instead tick at a configurable rate
Make repeaters' tick rate increase over time as the mouse is held
@dumblob
Copy link
Contributor

dumblob commented Dec 18, 2018

Hi, thanks for the PR. Before going further, could you please change the source files for "paqing"/amalgamation (see src/) and also bump the version accordingly?

@kg
Copy link
Author

kg commented Dec 18, 2018

You should consider putting a big warning at the top of nuklear.h that says not to edit it. I have another PR in the works I'll have to redo from scratch now. :(

@dumblob
Copy link
Contributor

dumblob commented Dec 18, 2018

Sorry for that, I can understand your frustration - feel free to put the warning either to README (e.g. to a section "how to contribute") and/or to the very top of the nuklear.h file.

@@ -13904,6 +13921,10 @@ nk_input_end(struct nk_context *ctx)
in->mouse.ungrab = 0;
in->mouse.grab = 0;
}
for (int i = 0; i < NK_BUTTON_MAX; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is invalid C89 code. C89 does now allow the definition of variables in the for statement. I recommend copying the style from the nk_input_begin function to fix this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants