416 lines
11 KiB
Plaintext
416 lines
11 KiB
Plaintext
<rml>
|
|
<head>
|
|
<link type="text/rcss" href="../../ui/html.rcss"/>
|
|
<link type="text/rcss" href="../../ui/theme.rcss"/>
|
|
<link type="text/rcss" href="../../ui/components.rcss"/>
|
|
<link type="text/rcss" href="../../ui/layout.rcss"/>
|
|
<script src="../../scripts/navigation.lua"></script>
|
|
<script src="../../scripts/layout.lua"></script>
|
|
<script src="camera.lua"></script>
|
|
<title>Camera</title>
|
|
<style>
|
|
.camera-screen {
|
|
background-color: #000000;
|
|
}
|
|
|
|
/* Top Controls */
|
|
.camera-top-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 16px;
|
|
position: absolute;
|
|
top: 36px;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
.camera-btn {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
background-color: rgba(0, 0, 0, 0.4);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.camera-btn:hover {
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.camera-btn:active {
|
|
background-color: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.camera-btn img {
|
|
width: 28px;
|
|
height: 28px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Viewfinder */
|
|
.viewfinder-container {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
}
|
|
|
|
.viewfinder {
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: #1a1a1a;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
}
|
|
|
|
.viewfinder-placeholder {
|
|
color: #666666;
|
|
font-size: 18px;
|
|
text-align: center;
|
|
}
|
|
|
|
.viewfinder-placeholder-icon {
|
|
font-size: 64px;
|
|
margin-bottom: 16px;
|
|
color: #444444;
|
|
}
|
|
|
|
/* Grid Overlay */
|
|
.grid-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.grid-line-h, .grid-line-v {
|
|
position: absolute;
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.grid-line-h {
|
|
height: 1px;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.grid-line-h.h1 { top: 33.33%; }
|
|
.grid-line-h.h2 { top: 66.66%; }
|
|
|
|
.grid-line-v {
|
|
width: 1px;
|
|
top: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
.grid-line-v.v1 { left: 33.33%; }
|
|
.grid-line-v.v2 { left: 66.66%; }
|
|
|
|
/* Focus indicator */
|
|
.focus-indicator {
|
|
position: absolute;
|
|
width: 80px;
|
|
height: 80px;
|
|
border: 2px solid #FFFFFF;
|
|
border-radius: 8px;
|
|
top: 50%;
|
|
left: 50%;
|
|
margin-top: -40px;
|
|
margin-left: -40px;
|
|
pointer-events: none;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* Camera Modes */
|
|
.camera-modes {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 16px 0;
|
|
gap: 24px;
|
|
}
|
|
|
|
.camera-mode {
|
|
font-size: 16px;
|
|
color: #B3B3B3;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
}
|
|
|
|
.camera-mode.active {
|
|
color: #FFD700;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.camera-mode:hover {
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
/* Bottom Controls */
|
|
.camera-bottom-bar {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
padding: 20px 32px;
|
|
background-color: rgba(0, 0, 0, 0.6);
|
|
}
|
|
|
|
.gallery-preview {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 8px;
|
|
background-color: #333333;
|
|
border: 2px solid #FFFFFF;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.gallery-preview:hover {
|
|
background-color: #444444;
|
|
}
|
|
|
|
.gallery-preview img {
|
|
width: 28px;
|
|
height: 28px;
|
|
opacity: 0.7;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.capture-btn {
|
|
width: 72px;
|
|
height: 72px;
|
|
border-radius: 36px;
|
|
background-color: #FFFFFF;
|
|
border: 4px solid rgba(255, 255, 255, 0.3);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.capture-btn:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.capture-btn:active {
|
|
transform: scale(0.95);
|
|
background-color: #E0E0E0;
|
|
}
|
|
|
|
.capture-btn-inner {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 30px;
|
|
background-color: #FFFFFF;
|
|
}
|
|
|
|
.capture-btn-video {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 12px;
|
|
background-color: #F44336;
|
|
}
|
|
|
|
.capture-btn-stop {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 4px;
|
|
background-color: #F44336;
|
|
}
|
|
|
|
.switch-camera-btn {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 24px;
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.switch-camera-btn:hover {
|
|
background-color: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.switch-camera-btn img {
|
|
width: 28px;
|
|
height: 28px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Indicators */
|
|
.indicator {
|
|
position: absolute;
|
|
background-color: rgba(0, 0, 0, 0.4);
|
|
padding: 6px 12px;
|
|
border-radius: 12px;
|
|
font-size: 14px;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.flash-indicator {
|
|
top: 100px;
|
|
left: 16px;
|
|
}
|
|
|
|
.timer-indicator {
|
|
top: 100px;
|
|
right: 16px;
|
|
}
|
|
|
|
.recording-indicator {
|
|
top: 140px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: none;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.recording-dot {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 6px;
|
|
background-color: #F44336;
|
|
}
|
|
|
|
/* Zoom control */
|
|
.zoom-control {
|
|
position: absolute;
|
|
bottom: 200px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.zoom-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 20px;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
color: #FFFFFF;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.zoom-btn:hover {
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.zoom-level {
|
|
font-size: 16px;
|
|
color: #FFD700;
|
|
font-weight: 600;
|
|
min-width: 48px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="app-screen camera-screen" onload="initLayout(document); initCamera(document)">
|
|
<!-- System Status Bar (transparent) -->
|
|
<div class="system-status-bar" style="background-color: transparent; position: absolute; top: 0; left: 0; right: 0; z-index: 20;">
|
|
<span id="status-time" class="system-status-time">12:30</span>
|
|
<div class="system-status-icons">
|
|
<img src="../../icons/wifi.tga"/>
|
|
<img src="../../icons/signal.tga"/>
|
|
<img src="../../icons/battery.tga"/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Top Bar -->
|
|
<div class="camera-top-bar">
|
|
<div class="camera-btn" onclick="goBack()">
|
|
<img src="../../icons/close.tga"/>
|
|
</div>
|
|
<div style="display: flex; gap: 12px;">
|
|
<div class="camera-btn" onclick="toggleFlash()">
|
|
<img src="../../icons/flash.tga"/>
|
|
</div>
|
|
<div class="camera-btn" onclick="toggleTimer()">
|
|
<img src="../../icons/timer.tga"/>
|
|
</div>
|
|
<div class="camera-btn" onclick="openCameraSettings()">
|
|
<img src="../../icons/settings.tga"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Viewfinder Area -->
|
|
<div class="viewfinder-container">
|
|
<div class="viewfinder" id="camera-viewfinder">
|
|
<div class="viewfinder-placeholder" id="viewfinder-placeholder">
|
|
<div class="viewfinder-placeholder-icon">C</div>
|
|
<div>Camera Preview</div>
|
|
<div style="font-size: 14px; margin-top: 8px; color: #555555;">
|
|
Tap to focus
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Grid Overlay -->
|
|
<div class="grid-overlay">
|
|
<div class="grid-line-h h1"></div>
|
|
<div class="grid-line-h h2"></div>
|
|
<div class="grid-line-v v1"></div>
|
|
<div class="grid-line-v v2"></div>
|
|
</div>
|
|
|
|
<!-- Focus Indicator -->
|
|
<div class="focus-indicator" id="focus-indicator"></div>
|
|
</div>
|
|
|
|
<!-- Indicators -->
|
|
<div class="indicator flash-indicator" id="flash-indicator">Flash: Auto</div>
|
|
<div class="indicator timer-indicator" id="timer-indicator">Timer: Off</div>
|
|
<div class="indicator recording-indicator" id="recording-indicator">
|
|
<div class="recording-dot"></div>
|
|
<span id="recording-time">00:00</span>
|
|
</div>
|
|
|
|
<!-- Zoom Control -->
|
|
<div class="zoom-control">
|
|
<div class="zoom-btn" onclick="zoomOut()">-</div>
|
|
<span class="zoom-level" id="zoom-level">1.0x</span>
|
|
<div class="zoom-btn" onclick="zoomIn()">+</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Camera Modes -->
|
|
<div class="camera-modes">
|
|
<span id="mode-night" class="camera-mode" onclick="switchMode('Night')">Night</span>
|
|
<span id="mode-portrait" class="camera-mode" onclick="switchMode('Portrait')">Portrait</span>
|
|
<span id="mode-photo" class="camera-mode active" onclick="switchMode('Photo')">Photo</span>
|
|
<span id="mode-video" class="camera-mode" onclick="switchMode('Video')">Video</span>
|
|
<span id="mode-more" class="camera-mode" onclick="switchMode('More')">More</span>
|
|
</div>
|
|
|
|
<!-- Bottom Bar -->
|
|
<div class="camera-bottom-bar">
|
|
<div class="gallery-preview" id="gallery-preview" onclick="openGallery()">
|
|
<img src="../../icons/gallery.tga"/>
|
|
</div>
|
|
<div class="capture-btn" id="capture-button" onclick="capture()">
|
|
<div class="capture-btn-inner"></div>
|
|
</div>
|
|
<div class="switch-camera-btn" onclick="switchCamera()">
|
|
<img src="../../icons/switch-camera.tga"/>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</rml>
|