mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 04:24:26 +00:00
Fry3DX 0.4: an easy 3D modeller
Shapes with live settings, shape editing, knife and hole tools, drawing shapes onto other objects, combining objects (add / subtract / overlap), copies, thickness, painting with stickers and layers, a Layout tab, a Print tab with checks, packed .fry files with autosave, export to GLB, glTF, FBX, OBJ, 3MF, STL and PLY, folders in Layers, its own crash screen, and a website for GitHub Pages in docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
This commit is contained in:
commit
f3e8eca87b
135 changed files with 23423 additions and 0 deletions
38
engine/ui/ui.h
Normal file
38
engine/ui/ui.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#pragma once
|
||||
// Game UI look: fonts from the game folder and a Source-like theme (dark
|
||||
// translucent panels, flat buttons, light text, red highlights) on top of Dear ImGui.
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct ImFont;
|
||||
|
||||
namespace keel::ui {
|
||||
|
||||
enum class Font { Regular, Bold, Title };
|
||||
|
||||
// After the renderer (ImGui context) and the VFS are up.
|
||||
void init();
|
||||
ImFont* font(Font f);
|
||||
// Sizes in pixels; scaled with the window height so 1080p looks like Source at 1080p.
|
||||
float scale();
|
||||
void beginFrame(float windowHeight);
|
||||
|
||||
// The highlight colour: highlights, the logo.
|
||||
inline constexpr uint8_t kAccent[3] = {227, 34, 45};
|
||||
uint32_t accent(float alpha = 1.0f, float brightness = 1.0f); // ImU32
|
||||
|
||||
// ── Popups: modal messages over everything (disconnects, errors, questions) ──
|
||||
struct PopupButton {
|
||||
std::string label;
|
||||
std::function<void()> action; // may be empty: just closes
|
||||
};
|
||||
// Queued; shown one at a time. No buttons = a single "OK".
|
||||
void popup(std::string title, std::string message, std::vector<PopupButton> buttons = {});
|
||||
bool popupOpen();
|
||||
void closePopup(); // Escape: like pressing the last button
|
||||
// The engine calls this each frame after the game's UI.
|
||||
void drawPopups();
|
||||
|
||||
} // namespace keel::ui
|
||||
Loading…
Reference in a new issue