This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package imgui_impl_raylib | |
// Based on the raylib extras rlImGui: https://github.com/raylib-extras/rlImGui/blob/main/rlImGui.cpp | |
/* Usage: | |
import imgui_rl "imgui_impl_raylib" | |
import imgui "../../odin-imgui" | |
main :: proc() { | |
rl.SetConfigFlags({ rl.ConfigFlag.WINDOW_RESIZABLE }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Symptom = None | Slight | Medium | Severe deriving (Show, Eq, Enum, Ord) | |
tempature :: (RealFloat a) => a -> Symptom | |
tempature t | |
| t >= 35 && t <= 37 = None | |
| t < 35 || (t > 37 && t < 39) = Slight | |
| t >= 39 = Medium | |
heartRate :: (RealFloat a) => a -> Symptom | |
heartRate bpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from 'react' | |
export function useWindowActive() { | |
const [isWindowActive, setWindowIsActive] = useState(!document.hidden && document.hasFocus()) | |
function onBlur() { | |
setWindowIsActive(false) | |
} | |
function onFocus() { |