mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
[gpu] / and ? toggle help: print in desktop, toggle HUD in web
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b8a17218d1
commit
0118c285ef
2 files changed
+12
-2
No files matched your search
@@ -387,8 +387,7 @@ demo_view_key_func (demo_view_t *vu, int key, int scancode, int action, int mods
|
||||
demo_view_toggle_animation (vu);
|
||||
break;
|
||||
case GLFW_KEY_SLASH:
|
||||
if (mods & GLFW_MOD_SHIFT)
|
||||
demo_view_print_help (vu);
|
||||
demo_view_print_help (vu);
|
||||
break;
|
||||
case GLFW_KEY_G:
|
||||
demo_view_cycle_gamma (vu);
|
||||
|
||||
@@ -217,6 +217,17 @@ space: animate · b: dark mode · g: gamma · s: stem · d: debug · r: reset</s
|
||||
var textModalEl = document.getElementById('text-modal');
|
||||
function blockKeysIfModal(e) {
|
||||
if (textModalEl.style.display !== 'flex') {
|
||||
if (e.key === '/' || e.key === '?') {
|
||||
var h = document.getElementById('help');
|
||||
var f = document.getElementById('fps');
|
||||
var c = document.getElementById('controls');
|
||||
var hidden = h.style.display === 'none';
|
||||
h.style.display = hidden ? '' : 'none';
|
||||
f.style.display = hidden ? '' : 'none';
|
||||
if (c) c.style.display = hidden ? '' : 'none';
|
||||
e.stopImmediatePropagation();
|
||||
return;
|
||||
}
|
||||
if (e.key === 'R') {
|
||||
location.reload();
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user