forked from rosebudai/OpenRCT2-Web
Namespace Drawing.String.cpp, declare its functions in Drawing.String.h
This commit is contained in:
36 files changed
+910
-869
No files matched your search
@@ -20,6 +20,7 @@
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/UTF8.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <openrct2/SpriteIds.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/drawing/Text.h>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "CustomImages.h"
|
||||
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/drawing/RenderTarget.h>
|
||||
@@ -158,8 +159,8 @@ namespace OpenRCT2::Scripting
|
||||
|
||||
DukValue measureText(const std::string& text)
|
||||
{
|
||||
auto width = GfxGetStringWidth(text, FontStyle::medium);
|
||||
auto height = StringGetHeightRaw(text.c_str(), FontStyle::medium);
|
||||
auto width = Drawing::GfxGetStringWidth(text, FontStyle::medium);
|
||||
auto height = Drawing::StringGetHeightRaw(text.c_str(), FontStyle::medium);
|
||||
return ToDuk<ScreenSize>(_ctx, { width, height });
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <openrct2/core/File.h>
|
||||
#include <openrct2/core/FileSystem.hpp>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Text.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
@@ -261,7 +262,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
_changelogLongestLineWidth = 0;
|
||||
for (const auto& line : _changelogLines)
|
||||
{
|
||||
int32_t linewidth = GfxGetStringWidth(line.c_str(), FontStyle::medium);
|
||||
int32_t linewidth = Drawing::GfxGetStringWidth(line.c_str(), FontStyle::medium);
|
||||
_changelogLongestLineWidth = std::max(linewidth, _changelogLongestLineWidth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <openrct2-ui/windows/Windows.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/core/Guard.hpp>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/localisation/Language.h>
|
||||
@@ -126,7 +127,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto& stringIdx = widgets[widgetIndex].text;
|
||||
auto string = ls.GetString(stringIdx);
|
||||
Guard::ArgumentNotNull(string);
|
||||
const auto strWidth = GfxGetStringWidth(string, FontStyle::medium);
|
||||
const auto strWidth = Drawing::GfxGetStringWidth(string, FontStyle::medium);
|
||||
newWidth = std::max<int16_t>(strWidth, newWidth);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <openrct2/core/BitSet.hpp>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <openrct2/Input.h>
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
#include <openrct2/audio/Audio.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Font.h>
|
||||
#include <openrct2/interface/Screenshot.h>
|
||||
@@ -126,12 +127,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
windowMgr->CloseByClass(WindowClass::error);
|
||||
|
||||
// How wide is the error string?
|
||||
int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::medium);
|
||||
int32_t width = Drawing::GfxGetStringWidthNewLined(buffer.data(), FontStyle::medium);
|
||||
width = std::clamp(width + 2 * kPadding, kMinWidth, kMaxWidth);
|
||||
|
||||
// How high is the error string?
|
||||
int32_t numLines{};
|
||||
GfxWrapString(buffer, width + 1, FontStyle::medium, &buffer, &numLines);
|
||||
Drawing::GfxWrapString(buffer, width + 1, FontStyle::medium, &buffer, &numLines);
|
||||
int32_t height = (numLines + 1) * FontGetLineHeight(FontStyle::medium) + (2 * kPadding);
|
||||
|
||||
// Position error message around the cursor
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <openrct2/actions/GameActionRunner.h>
|
||||
#include <openrct2/actions/park/ParkSetLoanAction.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
#include <openrct2/SpriteIds.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/entity/EntityRegistry.h>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <openrct2/core/Path.hpp>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <openrct2/actions/peep/PeepSpawnPlaceAction.h>
|
||||
#include <openrct2/actions/terraform/SurfaceSetStyleAction.h>
|
||||
#include <openrct2/audio/Audio.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/entity/EntityList.h>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <openrct2-ui/interface/Widget.h>
|
||||
#include <openrct2-ui/windows/Windows.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/network/Network.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
@@ -93,10 +94,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
_buffer.assign("{WHITE}");
|
||||
_buffer += _windowNetworkStatusText;
|
||||
GfxClipString(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::medium);
|
||||
Drawing::GfxClipString(_buffer.data(), widgets[WIDX_BACKGROUND].right - 50, FontStyle::medium);
|
||||
|
||||
ScreenCoordsXY screenCoords(windowPos.x + (width / 2), windowPos.y + (height / 2));
|
||||
screenCoords.x -= GfxGetStringWidth(_buffer, FontStyle::medium) / 2;
|
||||
screenCoords.x -= Drawing::GfxGetStringWidth(_buffer, FontStyle::medium) / 2;
|
||||
DrawTextBasic(rt, screenCoords, _buffer, { Drawing::Colour::black });
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <openrct2/core/File.h>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/IDrawingEngine.h>
|
||||
#include <openrct2/drawing/ScrollingText.h>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <openrct2/actions/park/ParkSetNameAction.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/UnitConversion.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Currency.h>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/core/UnitConversion.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/entity/EntityList.h>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/FileStream.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/core/Json.hpp>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/core/UTF8.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Formatting.h>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <openrct2/Input.h>
|
||||
#include <openrct2/SpriteIds.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <openrct2-ui/windows/Windows.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/Version.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/ColourWithFlags.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
@@ -28,12 +29,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Write name and version information
|
||||
const auto whiteOutline = ColourWithFlags{ Drawing::Colour::white }.withFlag(ColourFlag::withOutline, true);
|
||||
DrawTextBasic(rt, windowPos, gVersionInfoFull, { whiteOutline });
|
||||
width = GfxGetStringWidth(gVersionInfoFull, FontStyle::medium);
|
||||
width = Drawing::GfxGetStringWidth(gVersionInfoFull, FontStyle::medium);
|
||||
|
||||
// Write platform information
|
||||
constexpr const char platformInfo[] = OPENRCT2_PLATFORM " (" OPENRCT2_ARCHITECTURE ")";
|
||||
DrawTextBasic(rt, windowPos + ScreenCoordsXY(0, kListRowHeight), platformInfo, { whiteOutline });
|
||||
width = std::max<int16_t>(width, GfxGetStringWidth(platformInfo, FontStyle::medium)) + kTextOffset;
|
||||
width = std::max<int16_t>(width, Drawing::GfxGetStringWidth(platformInfo, FontStyle::medium)) + kTextOffset;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/Game.h>
|
||||
#include <openrct2/Input.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/core/UnitConversion.h>
|
||||
#include <openrct2/drawing/ColourMap.h>
|
||||
#include <openrct2/drawing/Drawing.String.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/drawing/IDrawingEngine.h>
|
||||
#include <openrct2/drawing/Rectangle.h>
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -10,35 +10,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "../core/FlagHolder.hpp"
|
||||
#include "../core/StringTypes.h"
|
||||
#include "../interface/ColourWithFlags.h"
|
||||
#include "TextColour.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
using StringId = uint16_t;
|
||||
struct ScreenCoordsXY;
|
||||
|
||||
enum class FontStyle : uint8_t;
|
||||
enum class TextDarkness : uint8_t;
|
||||
|
||||
enum class TextDrawFlag : uint8_t
|
||||
namespace OpenRCT2::Drawing
|
||||
{
|
||||
noFormatting,
|
||||
yOffsetEffect,
|
||||
ttf,
|
||||
noDraw,
|
||||
};
|
||||
using TextDrawFlags = FlagHolder<uint8_t, TextDrawFlag>;
|
||||
struct RenderTarget;
|
||||
|
||||
struct TextDrawInfo
|
||||
{
|
||||
int32_t startX{};
|
||||
int32_t startY{};
|
||||
int32_t x{};
|
||||
int32_t y{};
|
||||
int32_t maxX{};
|
||||
int32_t maxY{};
|
||||
TextDrawFlags textDrawFlags{};
|
||||
OpenRCT2::ColourFlags colourFlags{};
|
||||
TextDarkness darkness{};
|
||||
OpenRCT2::Drawing::TextColours palette{};
|
||||
FontStyle fontStyle{};
|
||||
const int8_t* yOffset{};
|
||||
};
|
||||
enum class TextDrawFlag : uint8_t
|
||||
{
|
||||
noFormatting,
|
||||
yOffsetEffect,
|
||||
ttf,
|
||||
noDraw,
|
||||
};
|
||||
using TextDrawFlags = FlagHolder<uint8_t, TextDrawFlag>;
|
||||
|
||||
struct TextDrawInfo
|
||||
{
|
||||
int32_t startX{};
|
||||
int32_t startY{};
|
||||
int32_t x{};
|
||||
int32_t y{};
|
||||
int32_t maxX{};
|
||||
int32_t maxY{};
|
||||
TextDrawFlags textDrawFlags{};
|
||||
OpenRCT2::ColourFlags colourFlags{};
|
||||
TextDarkness darkness{};
|
||||
TextColours palette{};
|
||||
FontStyle fontStyle{};
|
||||
const int8_t* yOffset{};
|
||||
};
|
||||
|
||||
void GfxDrawStringLeftCentred(
|
||||
RenderTarget& rt, StringId format, void* args, ColourWithFlags colour, const ScreenCoordsXY& coords);
|
||||
void DrawStringCentredRaw(
|
||||
RenderTarget& rt, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle);
|
||||
void DrawNewsTicker(
|
||||
RenderTarget& rt, const ScreenCoordsXY& coords, int32_t width, Colour colour, StringId format, u8string_view args,
|
||||
int32_t ticks);
|
||||
void GfxDrawStringWithYOffsets(
|
||||
RenderTarget& rt, const utf8* text, ColourWithFlags colour, const ScreenCoordsXY& coords, const int8_t* yOffsets,
|
||||
bool forceSpriteFont, FontStyle fontStyle);
|
||||
|
||||
int32_t GfxWrapString(
|
||||
u8string_view text, int32_t width, FontStyle fontStyle, u8string* outWrappedText, int32_t* outNumLines);
|
||||
int32_t GfxGetStringWidth(std::string_view text, FontStyle fontStyle);
|
||||
int32_t GfxGetStringWidthNewLined(std::string_view text, FontStyle fontStyle);
|
||||
int32_t GfxGetStringWidthNoFormatting(std::string_view text, FontStyle fontStyle);
|
||||
int32_t StringGetHeightRaw(std::string_view text, FontStyle fontStyle);
|
||||
int32_t GfxClipString(char* buffer, int32_t width, FontStyle fontStyle);
|
||||
u8string ShortenPath(const u8string& path, int32_t availableWidth, FontStyle fontStyle);
|
||||
void TTFDrawString(
|
||||
RenderTarget& rt, u8string_view text, ColourWithFlags colour, const ScreenCoordsXY& coords, bool noFormatting,
|
||||
FontStyle fontStyle, TextDarkness darkness);
|
||||
|
||||
} // namespace OpenRCT2::Drawing
|
||||
@@ -106,29 +106,6 @@ void FASTCALL GfxDrawSpriteSolid(
|
||||
void FASTCALL GfxDrawSpriteRawMasked(
|
||||
OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, ImageId maskImage, ImageId colourImage);
|
||||
|
||||
// string
|
||||
void GfxDrawStringLeftCentred(
|
||||
OpenRCT2::Drawing::RenderTarget& rt, StringId format, void* args, ColourWithFlags colour, const ScreenCoordsXY& coords);
|
||||
void DrawStringCentredRaw(
|
||||
OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle);
|
||||
void DrawNewsTicker(
|
||||
OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, int32_t width, OpenRCT2::Drawing::Colour colour,
|
||||
StringId format, u8string_view args, int32_t ticks);
|
||||
void GfxDrawStringWithYOffsets(
|
||||
OpenRCT2::Drawing::RenderTarget& rt, const utf8* text, ColourWithFlags colour, const ScreenCoordsXY& coords,
|
||||
const int8_t* yOffsets, bool forceSpriteFont, FontStyle fontStyle);
|
||||
|
||||
int32_t GfxWrapString(u8string_view text, int32_t width, FontStyle fontStyle, u8string* outWrappedText, int32_t* outNumLines);
|
||||
int32_t GfxGetStringWidth(std::string_view text, FontStyle fontStyle);
|
||||
int32_t GfxGetStringWidthNewLined(std::string_view text, FontStyle fontStyle);
|
||||
int32_t GfxGetStringWidthNoFormatting(std::string_view text, FontStyle fontStyle);
|
||||
int32_t StringGetHeightRaw(std::string_view text, FontStyle fontStyle);
|
||||
int32_t GfxClipString(char* buffer, int32_t width, FontStyle fontStyle);
|
||||
u8string ShortenPath(const u8string& path, int32_t availableWidth, FontStyle fontStyle);
|
||||
void TTFDrawString(
|
||||
OpenRCT2::Drawing::RenderTarget& rt, u8string_view text, ColourWithFlags colour, const ScreenCoordsXY& coords,
|
||||
bool noFormatting, FontStyle fontStyle, TextDarkness darkness);
|
||||
|
||||
void MaskSse4_1(
|
||||
int32_t width, int32_t height, const uint8_t* RESTRICT maskSrc, const uint8_t* RESTRICT colourSrc,
|
||||
OpenRCT2::Drawing::PaletteIndex* RESTRICT dst, int32_t maskWrap, int32_t colourWrap, int32_t dstWrap);
|
||||
|
||||
@@ -14,13 +14,12 @@
|
||||
#include "PaletteIndex.h"
|
||||
#include "TTF.h"
|
||||
|
||||
struct TextDrawInfo;
|
||||
|
||||
namespace OpenRCT2::Drawing
|
||||
{
|
||||
struct IDrawingEngine;
|
||||
struct PaletteMap;
|
||||
struct RenderTarget;
|
||||
struct TextDrawInfo;
|
||||
|
||||
struct IDrawingContext
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "../localisation/LocalisationService.h"
|
||||
#include "../paint/Paint.h"
|
||||
#include "BlendColourMap.h"
|
||||
#include "Drawing.String.h"
|
||||
#include "Drawing.h"
|
||||
#include "TTF.h"
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../localisation/Formatter.h"
|
||||
#include "../localisation/Formatting.h"
|
||||
#include "../localisation/Language.h"
|
||||
#include "Drawing.String.h"
|
||||
#include "Drawing.h"
|
||||
|
||||
using namespace OpenRCT2;
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
struct TextDrawInfo;
|
||||
|
||||
namespace OpenRCT2
|
||||
{
|
||||
namespace Ui
|
||||
@@ -27,6 +25,7 @@ namespace OpenRCT2
|
||||
|
||||
namespace Drawing
|
||||
{
|
||||
struct TextDrawInfo;
|
||||
class X8DrawingContext;
|
||||
|
||||
class X8WeatherDrawer final : public IWeatherDrawer
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../OpenRCT2.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../core/DataSerialiser.h"
|
||||
#include "../drawing/Drawing.String.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../interface/Viewport.h"
|
||||
#include "../interface/Window.h"
|
||||
@@ -108,7 +109,7 @@ namespace OpenRCT2
|
||||
auto [stringId, newValue] = GetStringId();
|
||||
char buffer[128];
|
||||
FormatStringLegacy(buffer, 128, stringId, &newValue);
|
||||
offsetX = -(GfxGetStringWidth(buffer, FontStyle::medium) / 2);
|
||||
offsetX = -(Drawing::GfxGetStringWidth(buffer, FontStyle::medium) / 2);
|
||||
}
|
||||
OffsetX = offsetX;
|
||||
Wiggle = 0;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../audio/Audio.h"
|
||||
#include "../audio/AudioMixer.h"
|
||||
#include "../core/UTF8.h"
|
||||
#include "../drawing/Drawing.String.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../drawing/Rectangle.h"
|
||||
#include "../drawing/Text.h"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../core/Money.hpp"
|
||||
#include "../core/Numerics.hpp"
|
||||
#include "../drawing/Drawing.String.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../interface/Viewport.h"
|
||||
#include "../localisation/Currency.h"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "../ReplayManager.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../drawing/Drawing.String.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../drawing/IDrawingEngine.h"
|
||||
#include "../drawing/Text.h"
|
||||
|
||||
Reference in new issue
Block a user