Completes "Geographic attribution display" for 0.1.0. The demo is built from OpenStreetMap data (ODbL 1.0) and needs attribution wherever the derived work is shown, so the credit now lives in the running game, not just the documents. - AGigLineHUD (C++): plain AHUD::DrawText in the bottom-left draws "(c) OpenStreetMap contributors" and "Data (c) OpenStreetMap contributors, ODbL 1.0 - openstreetmap.org/copyright", with a shadow pass so it stays legible over bright pavement and sky. No UMG widget asset is involved, so a cook cannot drop the attribution through a missing widget reference. - AGigLineGameModeBase: HUDClass = AGigLineHUD, so the credit is on by default in both the DemoMap and the ReviewMap. - AGigLineShotActor: screenshots are requested with the UI shown, so the credit appears in every capture under Screenshots/ - the obligation is provable from the images rather than only described. Docs: - THIRD_PARTY_NOTICES records that the attribution is displayed in-game and where the code lives. - Screenshots/README documents the overlay. - TODO marks the item done and narrows the remaining ODbL question to the shipped-derivative-database posture. Squash of branch gameplay-attribution-0.1.0 (PR #4).
43 lines
1.5 KiB
C++
43 lines
1.5 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");
|
|
|
|
/** 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;
|
|
};
|