载入中...
搜索中...
未找到
CardTypes.cpp
浏览该文件的文档.
76void drawTexture(graphics::Graphics *gfx, graphics::Texture *texture, float x, float y, float w, float h,
203void printCentered(graphics::Graphics *gfx, const std::string &text, float cx, float cy, float scale,
213void renderCardBack(graphics::Graphics *gfx, float x, float y, float w, float h, float angle, float a) {
229void renderCard(graphics::Graphics *gfx, const CardData &cardRef, const LayoutConfig &cfg, bool back) {
290 drawGem(gfx, x + inset, iy + ih - gem, gem, L->angle, glm::vec3(0.92f, 0.38f, 0.22f), a); // 攻击(橙)
单张卡牌:ECS 实体,数据拆成 Identity / Stats / Visual / Layout / State。
Definition CardTypes.h:84
void slotTransform(int i, int n, float &ox, float &oy, float &angle)
第 i 张(共 n 张)的扇形目标位置(牌中心)。
Definition CardTypes.cpp:374
void update(float dt, float mx, float my, bool down, const std::vector< Zone * > &zones, std::vector< CardEvent > &out)
每帧推进:布局 + 悬浮 + 拖拽状态机,产出事件到 out。
Definition CardTypes.cpp:385
float getWidth(const std::string &text) const
Pixel width of text (UTF-8), including kerning; delegates to FontData.
Definition Font.cpp:176
Definition Graphics.h:56
virtual void print(const std::string &text, float x, float y, const Color &color=Color(1.f, 1.f, 1.f, 1.f), float scale=1.f)
Draws UTF-8 text with the current font (see setFont), baseline-aligned so that (x,...
Definition Graphics.cpp:936
virtual void drawSolidRect(float x, float y, float w, float h, const Color &color, BlendMode blend=BlendMode::Alpha)=0
Internal immediate-mode helper used by RenderSystem / Batcher.
Definition Card.cpp:12
void renderCardBack(graphics::Graphics *gfx, float x, float y, float w, float h, float angle, float a)
绘制牌背。
Definition CardTypes.cpp:213
@ Played
@ Hovered
@ Discarded
@ Returning
@ Dragging
@ Disabled
void printCentered(graphics::Graphics *gfx, const std::string &text, float cx, float cy, float scale, const glm::vec4 &color)
渲染辅助(也供 Zone / Deck 复用)。
Definition CardTypes.cpp:203
void renderCard(graphics::Graphics *gfx, const CardData &cardRef, const LayoutConfig &cfg, bool back)
绘制单张卡牌(正面或牌背)。
Definition CardTypes.cpp:229