mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 23:50:52 +01:00
Merge branch 'dev' of https://github.com/billsonnn/nitro-react into dev
This commit is contained in:
commit
80b2635a22
10
src/App.tsx
10
src/App.tsx
@ -35,7 +35,7 @@ export const App: FC<{}> = props =>
|
|||||||
return urls;
|
return urls;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const loadPercent = useCallback(() => setPercent(prevValue => (prevValue + 16.66)), []);
|
const loadPercent = useCallback(() => setPercent(prevValue => (prevValue + 20)), []);
|
||||||
|
|
||||||
const handler = useCallback((event: NitroEvent) =>
|
const handler = useCallback((event: NitroEvent) =>
|
||||||
{
|
{
|
||||||
@ -78,9 +78,9 @@ export const App: FC<{}> = props =>
|
|||||||
setMessage('Connection Error');
|
setMessage('Connection Error');
|
||||||
return;
|
return;
|
||||||
case NitroCommunicationDemoEvent.CONNECTION_CLOSED:
|
case NitroCommunicationDemoEvent.CONNECTION_CLOSED:
|
||||||
if(GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose();
|
//if(GetNitroInstance().roomEngine) GetNitroInstance().roomEngine.dispose();
|
||||||
|
|
||||||
setIsError(true);
|
//setIsError(true);
|
||||||
setMessage('Connection Error');
|
setMessage('Connection Error');
|
||||||
|
|
||||||
HabboWebTools.send(-1, 'client.init.handshake.fail');
|
HabboWebTools.send(-1, 'client.init.handshake.fail');
|
||||||
@ -88,7 +88,7 @@ export const App: FC<{}> = props =>
|
|||||||
case RoomEngineEvent.ENGINE_INITIALIZED:
|
case RoomEngineEvent.ENGINE_INITIALIZED:
|
||||||
loadPercent();
|
loadPercent();
|
||||||
|
|
||||||
setTimeout(() => setIsReady(true), 200);
|
setTimeout(() => setIsReady(true), 300);
|
||||||
return;
|
return;
|
||||||
case NitroLocalizationEvent.LOADED:
|
case NitroLocalizationEvent.LOADED:
|
||||||
GetNitroInstance().core.asset.downloadAssets(getPreloadAssetUrls(), (status: boolean) =>
|
GetNitroInstance().core.asset.downloadAssets(getPreloadAssetUrls(), (status: boolean) =>
|
||||||
@ -134,7 +134,7 @@ export const App: FC<{}> = props =>
|
|||||||
<Base fit overflow="hidden">
|
<Base fit overflow="hidden">
|
||||||
{ (!isReady || isError) &&
|
{ (!isReady || isError) &&
|
||||||
<LoadingView isError={isError} message={message} percent={ percent } /> }
|
<LoadingView isError={isError} message={message} percent={ percent } /> }
|
||||||
<TransitionAnimation type={ TransitionAnimationTypes.FADE_IN } inProp={ (isReady && !isError) }>
|
<TransitionAnimation type={ TransitionAnimationTypes.FADE_IN } inProp={ (isReady) }>
|
||||||
<MainView />
|
<MainView />
|
||||||
</TransitionAnimation>
|
</TransitionAnimation>
|
||||||
<Base id="draggable-windows-container" />
|
<Base id="draggable-windows-container" />
|
||||||
|
Loading…
Reference in New Issue
Block a user