Merged PR #18: package + document controls Co-authored-by: Zwitschi <zwitschi82@gmail.com>
51 lines
1.9 KiB
C++
51 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/HUD.h"
|
|
#include "GigLineHUD.generated.h"
|
|
|
|
/**
|
|
* Always-on geographic attribution for the shipped demo.
|
|
*
|
|
* The demo is built from OpenStreetMap data, which is ODbL 1.0 licensed and
|
|
* requires attribution wherever a derived database or produced work is shown.
|
|
* This HUD draws the required credit in the bottom-left corner of the screen so
|
|
* it is present in the game, not only in the repository documents.
|
|
*
|
|
* Plain AHUD::DrawText is used deliberately: no UMG widget asset is needed, so
|
|
* the attribution cannot be accidentally dropped from a cook by a missing
|
|
* widget reference.
|
|
*/
|
|
UCLASS()
|
|
class GIGLINE_API AGigLineHUD : public AHUD
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void DrawHUD() override;
|
|
|
|
/** Main credit line. Must match the ODbL attribution requirement. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attribution")
|
|
FString AttributionLine = TEXT("\u00A9 OpenStreetMap contributors");
|
|
|
|
/**
|
|
* Control legend, shown bottom-right so the 0.1.0 demo documents its own
|
|
* controls in-game (release check: "controls documented in Docs/ and shown
|
|
* in-game"). Keep in sync with Docs/controls.md.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Controls")
|
|
FString ControlsLine = TEXT("WASD move \u00B7 Mouse look \u00B7 Space jump \u00B7 R reset \u00B7 Esc pause");
|
|
|
|
/** Licence line, including where the licence can be read. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attribution")
|
|
FString LicenceLine = TEXT("Data \u00A9 OpenStreetMap contributors, ODbL 1.0 \u2014 openstreetmap.org/copyright");
|
|
|
|
/** Screen-space margin in pixels. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attribution")
|
|
float MarginPx = 18.0f;
|
|
|
|
/** Text scale relative to the default canvas font. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attribution")
|
|
float TextScale = 1.45f;
|
|
};
|