Skip to content

Commit

Permalink
use Apple shortcut on mac
Browse files Browse the repository at this point in the history
- upgraded to latest emscripten-glfw
- properly handle cut/copy/paste via platform shortcuts
- added full screen without resizing the canvas
  • Loading branch information
ypujante committed Aug 18, 2024
1 parent 7285c83 commit 2e6ea1e
Show file tree
Hide file tree
Showing 11 changed files with 169 additions and 107 deletions.
6 changes: 3 additions & 3 deletions external/emscripten-ports/emscripten-glfw3.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import os
from typing import Union, Dict

TAG = '3.4.0.20240731'
HASH = '1d348f2a6423def537bc11ba5a67347d23696f623e0155e315711d0e23e9b4e6f623019c24c699b6dd5b727322f7093af804d58fc48488f37888ba17300c3aa8'
TAG = '3.4.0.20240817'
HASH = 'f75e711ec47c5eb04cff7fef5f2ef6788445bb86ed570a884ccb0e839744c3ed38b5f94808d1fac1417f356177e753e4ac8cafed9ad808d24d8fd08d23ca07f0'
ZIP_URL = f'https://github.com/pongasoft/emscripten-glfw/releases/download/v{TAG}/emscripten-glfw3-{TAG}.zip'

# contrib port information (required)
Expand Down Expand Up @@ -104,7 +104,7 @@ def process_args(ports):
args = [
'-I', os.path.join(root_path, 'external'), # <GLFW/glfw3.h>
'-I', os.path.join(root_path, 'include'), # <GLFW/emscripten_glfw3.h>
'-DEMSCRIPTEN_USE_PORT_CONTRIB_GLFW3'
f'-DEMSCRIPTEN_USE_PORT_CONTRIB_GLFW3={TAG.replace(".", "")}'
]
return args

Expand Down
44 changes: 44 additions & 0 deletions external/fontawesome/src/icons/metadata/icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ backward:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Backward
search:
terms:
Expand Down Expand Up @@ -43,6 +44,7 @@ backward-fast:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Backward Fast
search:
terms:
Expand Down Expand Up @@ -77,6 +79,7 @@ bars:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Bars
search:
terms:
Expand Down Expand Up @@ -117,6 +120,7 @@ camera:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Camera
search:
terms:
Expand Down Expand Up @@ -144,6 +148,7 @@ camera-polaroid:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Camera Polaroid
search:
terms:
Expand Down Expand Up @@ -177,6 +182,7 @@ circle-pause:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Circle Pause
search:
terms:
Expand Down Expand Up @@ -205,6 +211,7 @@ circle-play:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Circle Play
search:
terms:
Expand Down Expand Up @@ -235,6 +242,7 @@ clock-rotate-left:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Clock Rotate Left
search:
terms:
Expand Down Expand Up @@ -262,6 +270,7 @@ expand:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Expand
search:
terms:
Expand All @@ -280,6 +289,37 @@ expand:
- solid
unicode: f065
voted: false
expand-wide:
aliases:
unicodes:
secondary:
- 10f320
changes:
- 5.0.0
- 6.0.0-beta1
- 6.2.0
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Expand Wide
search:
terms:
- maximize
- resize
- scale
- arrows
- bigger
- enlarge
- fullscreen
- resize
- size
- expand
- viewfinder
styles:
- solid
unicode: f320
voted: false
forward:
aliases:
unicodes:
Expand All @@ -295,6 +335,7 @@ forward:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Forward
search:
terms:
Expand Down Expand Up @@ -326,6 +367,7 @@ forward-fast:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Forward Fast
search:
terms:
Expand Down Expand Up @@ -356,6 +398,7 @@ hammer:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Hammer
search:
terms:
Expand Down Expand Up @@ -390,6 +433,7 @@ power-off:
- 6.3.0
- 6.4.0
- 6.5.0
- 6.6.0
label: Power Off
search:
terms:
Expand Down
Binary file modified external/fontawesome/src/webfonts/fa-solid-900.ttf
Binary file not shown.
66 changes: 33 additions & 33 deletions external/fonts/src/IconsFontWGPUShaderToy.cpp
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
// File: '/Volumes/Development/github/org.pongasoft/webgpu-shader-toy/external/fontawesome/src/webfonts/fa-solid-900.ttf' (4744 bytes)
// File: '/Volumes/Development/github/org.pongasoft/webgpu-shader-toy/external/fontawesome/src/webfonts/fa-solid-900.ttf' (5072 bytes)
// Exported using binary_to_compressed_c.cpp
static const char IconsFontWGPUShaderToy_compressed_data_base85[4220+1] =
"7])#######i^;bN'/###[),##-`($#Q6>##kZn42RUQOBc,>>#a?'o/aNV=B8;UL/E(m<-AWaJ1j/0%J%j4Z5o?uu#^bIn3$-d<Bmu<n6,'l?-w?pV-TT$=(V(`Z#.fG<-a*.m/<_[FH"
"7%]0#g1RA-frEn/E2JuBGW#7(XKwA-@sEn/3I[^ISM7%#n_./MfINDF6PEk3nGH/#ha1_APpa:GGp9).)d8>#t]O$Ml@R]MHVs+;s,5f;?he<6&%iZ#[email protected]#v.6pE#B<Mt-"
"Zr[fL(`(p.%,>>#$:&:)7Vj)#ul=u#heW3M<AT;-@[email protected]/#@[>hLl_Y-M=I#hLP[d>#$9QtLhOQ>#Y&@qLvA>0NJi0=#l?*1#.%no%C3`eMWs5/(9.^e$89ff=jeiE.=4b(N5Z@`a"
"Xg_tLCC=;.YTc%XE1'?-OYr.Lcmd&#e(+GM+n?]O#xSfLEa$#P$cEB-#PP8.'G:;$RG4_JF5-F%nv+po'5>>#JLpV.,UV8&ij+poE@f:dN-%Q0$;d'&/w79.>P/Q.FiSQ.h2I0qR@d3q"
"HKu6qf+F9qkr4Qqp*,uqx7o-sUnR1v_<r:QQOU9TbJMQMZC00qZ>SNg_'&k^E^?*WE,@?cD360LBBWs%9&%qLmv@(#,E-(#GEaJMwudYP_mS%#IiGU)H8YY#B>k?$.iqr$7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m.:C%<FN15qhk17#:F.ww/PD0:rVC@rLG-=C=GH>_V.G.gcdG*M#hF5xLVC2]HKF6-giF)QtnD#0SdF>M_oD2<XG-"
"MhW?-EcO_&+Q^D4rNiM1'n<^>->hoDGXrK2HScC5KPPc4-ir&P'V$pMj[EA-5?N60:4//G/C%12QZ@Q-Q#4N.<rY1FF_pNkEuJ*#Vgb.#c:F&#1G_/#)sarLBX+rLmJG&#gRrt-ilWrL"
"uJG&#xf(T.NH4.#6DSX.+E-(#PM5s-pOnFO60w+#NaV6Mq/K-#gXU).3M*rLK:CSMmlFrLn9v.#ZZO.#S.%I-`R1H-(p)M-cdF?-NFf>-2iSN-wDHL-QY`=-]eF?-TLx>-NHJF-D,@A-"
"wvQx-w)IqL^i^k.Y#S-#<[gTSD?7r73OcD4rx8V-[*TN-%]AN-g:7I-$Xn:M^3S(#;&*)#1K6(#5r9S-c;8F-w]9E+2w`(8-%8X1Y:D<-Ohf/.5aErL8>4)#K)B;-Da+(.:e)$8qT*j1"
"_U,aF=]><DO0OT.%5YY#vC58.nH(&+CkPJ$#9X$#';P>#,Gc>#0Su>#4`1?#8lC?#<xU?#@.i?#q#AiFJGRV1fKk'%fmnUCgd]NBv_ECI3p(U1(o<GH8FV9.sQ7fG=<8p&R]?L,lWmJC"
"1NKKFOBD<BxAgjB$N'kE=wElEsxGkB#<bNEQ3oFH6&2U1%,rEHMZXV.(#PVCheSr/@8/:CXm%=BTAlG-^jA?0G:?lE%&CoD2n8AtZ_X/F";

2 changes: 2 additions & 0 deletions external/fonts/src/IconsFontWGPUShaderToy.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ constexpr auto kCirclePlay = "\xef\x85\x84"; // U+f144
constexpr auto kClockRotateLeft = "\xef\x87\x9a"; // U+f1da
#define ICON_FA_Expand "\xef\x81\xa5" // U+f065
constexpr auto kExpand = "\xef\x81\xa5"; // U+f065
#define ICON_FA_ExpandWide "\xef\x8c\xa0" // U+f320
constexpr auto kExpandWide = "\xef\x8c\xa0"; // U+f320
#define ICON_FA_Forward "\xef\x81\x8e" // U+f04e
constexpr auto kForward = "\xef\x81\x8e"; // U+f04e
#define ICON_FA_ForwardFast "\xef\x81\x90" // U+f050
Expand Down
47 changes: 17 additions & 30 deletions external/santaclose/ImGuiColorTextEdit/TextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@ void TextEditor::Paste()
if(mReadOnly)
return;

auto clipboard = ImGui::GetClipboardText();
if(!clipboard)
return;

Paste(ImGui::GetClipboardText());
}

Expand Down Expand Up @@ -2031,23 +2027,20 @@ void TextEditor::HandleKeyboardInputs(bool aParentIsFocused)
{
if(ImGui::IsWindowHovered())
ImGui::SetMouseCursor(ImGuiMouseCursor_TextInput);
//ImGui::CaptureKeyboardFromApp(true);

ImGuiIO &io = ImGui::GetIO();
auto alt = io.KeyAlt;
auto ctrl = io.KeyCtrl;
auto shift = io.KeyShift;

// In a web browser context, using Super is not working well on macOS, so using Windows no matter what
constexpr auto isOSX = false;
constexpr auto super = false;
// YP Note: ImGui automatically swaps Ctrl and Super so no need to handle it!
ImGuiIO& io = ImGui::GetIO();
const auto alt = io.KeyAlt;
const auto ctrl = io.KeyCtrl;
const auto shift = io.KeyShift;
const auto super = io.KeySuper;

auto isShortcut = (isOSX ? (super && !ctrl) : (ctrl && !super)) && !alt && !shift;
auto isShiftShortcut = (isOSX ? (super && !ctrl) : (ctrl && !super)) && shift && !alt;
auto isWordmoveKey = isOSX ? alt : ctrl;
auto isAltOnly = alt && !ctrl && !shift && !super;
auto isCtrlOnly = ctrl && !alt && !shift && !super;
auto isShiftOnly = shift && !alt && !ctrl && !super;
const auto isShortcut = (ctrl && !super) && !alt && !shift;
const auto isShiftShortcut = (ctrl && !super) && shift && !alt;
const auto isWordmoveKey = ctrl;
const auto isAltOnly = alt && !ctrl && !shift && !super;
const auto isCtrlOnly = ctrl && !alt && !shift && !super;
const auto isShiftOnly = shift && !alt && !ctrl && !super;

io.WantCaptureKeyboard = true;
io.WantTextInput = true;
Expand All @@ -2064,9 +2057,9 @@ void TextEditor::HandleKeyboardInputs(bool aParentIsFocused)
MoveUp(1, shift);
else if(!alt && !ctrl && !super && ImGui::IsKeyPressed(ImGuiKey_DownArrow))
MoveDown(1, shift);
else if((isOSX ? !ctrl : !alt) && !super && ImGui::IsKeyPressed(ImGuiKey_LeftArrow))
else if(!alt && !super && ImGui::IsKeyPressed(ImGuiKey_LeftArrow))
MoveLeft(shift, isWordmoveKey);
else if((isOSX ? !ctrl : !alt) && !super && ImGui::IsKeyPressed(ImGuiKey_RightArrow))
else if(!alt && !super && ImGui::IsKeyPressed(ImGuiKey_RightArrow))
MoveRight(shift, isWordmoveKey);
else if(!alt && !ctrl && !super && ImGui::IsKeyPressed(ImGuiKey_PageUp))
MoveUp(mVisibleLineCount - 2, shift);
Expand Down Expand Up @@ -2098,22 +2091,16 @@ void TextEditor::HandleKeyboardInputs(bool aParentIsFocused)
ToggleLineComment();
else if(!alt && !ctrl && !shift && !super && ImGui::IsKeyPressed(ImGuiKey_Insert))
mOverwrite ^= true;
else if(isCtrlOnly && ImGui::IsKeyPressed(ImGuiKey_Insert))
Copy();
else if(isCtrlOnly && ImGui::IsKeyPressed(ImGuiKey_A))
else if(!alt && !shift && (super || ctrl) && ImGui::IsKeyPressed(ImGuiKey_A))
MoveHome(false);
else if(isCtrlOnly && ImGui::IsKeyPressed(ImGuiKey_E))
else if(!alt && !shift && (super || ctrl) && ImGui::IsKeyPressed(ImGuiKey_E))
MoveEnd(false);
else if(isShortcut && ImGui::IsKeyPressed(ImGuiKey_C))
Copy();
else if(!mReadOnly && isShiftOnly && ImGui::IsKeyPressed(ImGuiKey_Insert))
OnKeyboardPaste();
else if(!mReadOnly && isShortcut && ImGui::IsKeyPressed(ImGuiKey_V))
OnKeyboardPaste();
Paste();
else if(isShortcut && ImGui::IsKeyPressed(ImGuiKey_X))
Cut();
else if(isShiftOnly && ImGui::IsKeyPressed(ImGuiKey_Delete))
Cut();
else if(isShiftShortcut && ImGui::IsKeyPressed(ImGuiKey_A))
SelectAll();
else if(isShortcut && ImGui::IsKeyPressed(ImGuiKey_D))
Expand Down
Loading

0 comments on commit 2e6ea1e

Please sign in to comment.