File tree Expand file tree Collapse file tree 5 files changed +1652
-1627
lines changed
usermods/usermod_v2_games Expand file tree Collapse file tree 5 files changed +1652
-1627
lines changed Original file line number Diff line number Diff line change @@ -330,9 +330,9 @@ class GamesUsermod : public Usermod {
330330 strip.addEffect (255 , &mode_pongGame, _data_FX_MODE_PONGGAME);
331331 #ifdef USERMOD_MPU6050_IMU
332332 IMU = (MPU6050Driver *)usermods.lookup (USERMOD_ID_IMU);
333- // #ifdef WLED_DEBUG
333+ #ifdef WLED_DEBUG
334334 strip.addEffect (255 , &mode_IMUTest, _data_FX_MODE_IMUTest);
335- // #endif
335+ #endif
336336 #endif
337337 strip.addEffect (255 , &mode_3DIMUCube, _data_FX_MODE_3DIMUCube); // works also without IMU
338338 }
Original file line number Diff line number Diff line change 6666 < button id ="buttonPower " onclick ="togglePower() " class ="tgl "> < i class ="icons "> </ i > < p class ="tab-label "> Power</ p > </ button >
6767 < button id ="buttonNl " onclick ="toggleNl() "> < i class ="icons "> </ i > < p class ="tab-label "> Timer</ p > </ button >
6868 < button id ="buttonSync " onclick ="toggleSync() "> < i class ="icons "> </ i > < p class ="tab-label "> Sync</ p > </ button >
69- < button id ="buttonSr " onclick ="toggleLiveview() "> < i class ="icons "> </ i > < p class ="tab-label "> GFX ☾ </ p > </ button >
69+ < button id ="buttonSr " onclick ="toggleLiveview() "> < i class ="icons "> </ i > < p class ="tab-label "> GFX</ p > </ button >
7070 < button id ="buttonI " onclick ="toggleInfo() "> < i class ="icons "> </ i > < p class ="tab-label "> Info</ p > </ button >
7171 < button id ="buttonNodes " onclick ="toggleNodes() "> < i class ="icons "> </ i > < p class ="tab-label "> Nodes</ p > </ button >
7272 < button onclick ="window.location.href='/settings'; "> < i class ="icons "> </ i > < p class ="tab-label "> Config</ p > </ button >
210210 < div id ="effectGFX "> <!--WLEDMM-->
211211 <!-- <p class="labels hd">Peek ☾ <button class="btn infobtn btn-xs" onclick="eandp(this,gId('canvasPeek'));">v</button></p> -->
212212 < br >
213- < canvas id ="canvasPeek "> </ canvas > < br >
213+ < canvas id ="canvasPeek " onclick =" bigPeek(true) " > </ canvas > < br >
214214 < br >
215215 </ div >
216216 < div id ="fx ">
Original file line number Diff line number Diff line change @@ -1963,6 +1963,22 @@ function toggleLiveview()
19631963 if ( ws && ws . readyState === WebSocket . OPEN ) ws . send ( `{"lv":${ isLv } }` ) ;
19641964}
19651965
1966+ //WLEDMM create and delete iFrame for peek (isLv is true if create)
1967+ function bigPeek ( doCreate )
1968+ {
1969+ let lvID = "liveview2D"
1970+ if ( doCreate ) {
1971+ var cn = '<iframe id="liveview2D" src="about:blank" onload="this.contentWindow.document.body.onclick=function(){bigPeek(false);}"></iframe>' ;
1972+ gId ( 'kliveview2D' ) . innerHTML = cn ;
1973+ }
1974+
1975+ gId ( 'mliveview2D' ) . style . transform = ( doCreate ) ? "translateY(0px)" :"translateY(100%)" ;
1976+
1977+ gId ( lvID ) . style . display = ( doCreate ) ? "block" :"none" ;
1978+ var url = ( loc ?`http://${ locip } ` :'' ) + "/" + lvID ;
1979+ gId ( lvID ) . src = ( doCreate ) ? url :"about:blank" ;
1980+ }
1981+
19661982function toggleInfo ( )
19671983{
19681984 if ( isNodes ) toggleNodes ( ) ;
You can’t perform that action at this time.
0 commit comments