Compare commits
3 commits
32046d9bf8
...
c7cc3ba76c
Author | SHA1 | Date | |
---|---|---|---|
c7cc3ba76c | |||
0aa933e766 | |||
5ea6f1e3a7 |
3 changed files with 88 additions and 49 deletions
|
@ -220,12 +220,14 @@ static const std::map<Int, Containers::StringView> bshooter_triggers {
|
|||
{4, "Longhold Trigger (1H)"_s},
|
||||
{5, "Downhold Trigger (1H)"_s},
|
||||
{6, "Cellblock Trigger (1H)"_s},
|
||||
{99, "Base Trigger (1H)"_s},
|
||||
|
||||
{100, "BL-Machine Trigger (2H)"_s},
|
||||
{101, "BL-Short Trigger (2H)"_s},
|
||||
{102, "Shielded Trigger (2H)"_s},
|
||||
{103, "Platedframe Trigger (2H)"_s},
|
||||
{104, "Sidebox Trigger (2H) (Motion)"_s},
|
||||
{199, "2H Base Trigger (2H)"_s},
|
||||
};
|
||||
|
||||
static const std::map<Int, Containers::StringView> bshooter_barrels {
|
||||
|
@ -234,21 +236,33 @@ static const std::map<Int, Containers::StringView> bshooter_barrels {
|
|||
{2, "Muzzlemod Barrel (1 shot)"_s},
|
||||
{3, "Triangular Barrel (1 shot)"_s},
|
||||
{4, "Recoilblock Barrel (1 shot) (Motion)"_s},
|
||||
{97, "Short S Base Barrel (1 shot)"_s},
|
||||
{98, "Medium S Base Barrel (1 shot)"_s},
|
||||
{99, "Long S Base Barrel (1 shot)"_s},
|
||||
|
||||
{100, "Six-Barrel Gatling (Auto) (Motion)"_s},
|
||||
{101, "Modded Six-Barrel Gatling (Auto) (Motion)"_s},
|
||||
{102, "Four-Barrel Gatling (Auto) (Motion)"_s},
|
||||
{103, "Retro Style Gatling (Auto) (Motion)"_s},
|
||||
{197, "Short G Base Barrel (Auto)"_s},
|
||||
{198, "Medium G Base Barrel (Auto)"_s},
|
||||
{199, "Long G Base Barrel (Auto)"_s},
|
||||
|
||||
{200, "Blast Barrel (Spread)"_s},
|
||||
{201, "Wideblast Barrel (Spread) (Motion)"_s},
|
||||
{202, "Pelleter Barrel (Spread) (Motion)"_s},
|
||||
{203, "Lockhold Barrel (Spread) (Motion)"_s},
|
||||
{297, "Short B Base Barrel (Spread)"_s},
|
||||
{298, "Medium B Base Barrel (Spread)"_s},
|
||||
{299, "Long B Base Barrel (Spread)"_s},
|
||||
|
||||
{300, "Propulsive Barrel (Detonate)"_s},
|
||||
{301, "Roundbox Barrel (Detonate)"_s},
|
||||
{302, "ShieldDet Barrel (Detonate)"_s},
|
||||
{303, "RecoilDet Barrel (Detonate) (Motion)"_s},
|
||||
{397, "Short D Base Barrel (Detonate)"_s},
|
||||
{398, "Medium D Base Barrel (Detonate)"_s},
|
||||
{399, "Long D Base Barrel (Detonate)"_s},
|
||||
};
|
||||
// endregion
|
||||
|
||||
|
@ -261,12 +275,14 @@ static const std::map<Int, Containers::StringView> eshooter_triggers {
|
|||
{4, "EN-Needler Trigger (1H)"_s},
|
||||
{5, "Angular Trigger (1H)"_s},
|
||||
{6, "Exposed Trigger (1H)"_s},
|
||||
{99, "Base EnTrigger (1H)"_s},
|
||||
|
||||
{100, "EN-Combat Trigger (2H)"_s},
|
||||
{101, "EN-Alternate Trigger (2H)"_s},
|
||||
{102, "Framed Trigger (2H) (Motion)"_s},
|
||||
{103, "Stabilised Trigger (2H)"_s},
|
||||
{104, "EN-Heavy Trigger (2H)"_s},
|
||||
{199, "2H Base EnTrigger (2H)"_s},
|
||||
};
|
||||
|
||||
static const std::map<Int, Containers::StringView> eshooter_busters {
|
||||
|
@ -274,21 +290,33 @@ static const std::map<Int, Containers::StringView> eshooter_busters {
|
|||
{1, "Delta Cycler (1 shot) (Motion)"_s},
|
||||
{2, "EN-Longbarrel Buster (1 shot)"_s},
|
||||
{3, "Kinetic Buster (1 shot) (Motion)"_s},
|
||||
{97, "Short S Base Buster (1 shot)"_s},
|
||||
{98, "Medium S Base Buster (1 shot)"_s},
|
||||
{99, "Long S Base Buster (1 shot)"_s},
|
||||
|
||||
{100, "EN-Rifle Buster (Auto)"_s},
|
||||
{101, "EN-Focus Buster (Auto)"_s},
|
||||
{102, "Machinist Buster (Auto)"_s},
|
||||
{103, "EN-Precision Buster (Auto) (Motion)"_s},
|
||||
{197, "Short A Base Buster (Auto)"_s},
|
||||
{198, "Medium A Base Buster (Auto)"_s},
|
||||
{199, "Long A Base Buster (Auto)"_s},
|
||||
|
||||
{200, "Railcharge Buster (Ray) (Motion)"_s},
|
||||
{201, "Clawcharge Buster (Ray)"_s},
|
||||
{202, "Twizelcharge Buster (Ray)"_s},
|
||||
{203, "Deltacharge Buster (Ray)"_s},
|
||||
{297, "Short R Base Buster (Ray)"_s},
|
||||
{298, "Medium R Base Buster (Ray)"_s},
|
||||
{299, "Long R Base Buster (Ray)"_s},
|
||||
|
||||
{300, "Subsonic Buster (Wave)"_s},
|
||||
{301, "Amplifier Buster (Wave) (Motion)"_s},
|
||||
{302, "Cyclonwave Buster (Wave)"_s},
|
||||
{303, "Warhorn Buster (Wave) (Motion)"_s},
|
||||
{397, "Short W Base Buster (Wave)"_s},
|
||||
{398, "Medium W Base Buster (Wave)"_s},
|
||||
{399, "Long W Base Buster (Wave)"_s},
|
||||
};
|
||||
// endregion
|
||||
|
||||
|
@ -299,24 +327,28 @@ static const std::map<Int, Containers::StringView> blauncher_pods {
|
|||
{2, "Detector Launcher (Missile x12)"_s},
|
||||
{3, "BL-Triplet Pack Launcher (Missile x12)"_s},
|
||||
{4, "Shielded Launcher (Missile x12)"_s},
|
||||
{99, "H Base Pod (Missile x12)"_s},
|
||||
|
||||
{100, "Warhead Pod (Nuke x2)"_s},
|
||||
{101, "Warhead Launcher (Nuke x2)"_s},
|
||||
{102, "Triangular Warhead Pod (Nuke x2)"_s},
|
||||
{103, "Expanded Warhead Pod (Nuke x2)"_s},
|
||||
{104, "Shielded Warhead Pod (Nuke x2)"_s},
|
||||
{199, "N Base Pod (Nuke x2)"_s},
|
||||
|
||||
{200, "Widepack Launcher (Salvo x24)"_s},
|
||||
{201, "Covered Launcher (Salvo x24)"_s},
|
||||
{202, "Double Delta Launcher (Salvo x24)"_s},
|
||||
{203, "Hexagonal Launcher (Salvo x24)"_s},
|
||||
{204, "Shielded Six Launcher (Salvo x24)"_s},
|
||||
{299, "S Base Pod (Salvo x24)"_s},
|
||||
|
||||
{300, "Sentinel Cluster Pod (Cluster x40)"_s},
|
||||
{301, "Pincer Cluster Pod (Cluster x40)"_s},
|
||||
{302, "Elliptical Cluster Pod (Cluster x40)"_s},
|
||||
{303, "Sawed Cluster Pod (Cluster x40)"_s},
|
||||
{304, "Pentagonal Cluster Pod (Cluster x40)"_s},
|
||||
{399, "C Base Pod (Cluster x40)"_s},
|
||||
};
|
||||
|
||||
static const std::map<Int, Containers::StringView> blauncher_projectiles {
|
||||
|
@ -358,6 +390,7 @@ static const std::map<Int, Containers::StringView> elauncher_generators {
|
|||
{25, "Carrier Unit"_s},
|
||||
{26, "Compartment Unit"_s},
|
||||
{27, "Flatedge Unit"_s},
|
||||
{99, "Base Generator"},
|
||||
};
|
||||
|
||||
static const std::map<Int, Containers::StringView> elauncher_pods {
|
||||
|
@ -368,6 +401,7 @@ static const std::map<Int, Containers::StringView> elauncher_pods {
|
|||
{4, "EN-Needler Launcher (Echo)"_s},
|
||||
{5, "Spark Launcher (Echo)"_s},
|
||||
{6, "Pinpoint Launcher (Echo)"_s},
|
||||
{99, "E Base EPod (Echo)"_s},
|
||||
|
||||
{100, "Raystream Launcher (Beam)"_s},
|
||||
{101, "Perpetum Launcher (Beam)"_s},
|
||||
|
@ -376,6 +410,7 @@ static const std::map<Int, Containers::StringView> elauncher_pods {
|
|||
{104, "Crosshair Launcher (Beam)"_s},
|
||||
{105, "Powerlined Launcher (Beam)"_s},
|
||||
{106, "Attached Launcher (Beam)"_s},
|
||||
{199, "B Base EPod (Beam)"_s},
|
||||
|
||||
{200, "Hilt Launcher (Slash) (Motion)"_s},
|
||||
{201, "Underangle Launcher (Slash)"_s},
|
||||
|
@ -384,6 +419,7 @@ static const std::map<Int, Containers::StringView> elauncher_pods {
|
|||
{204, "Spike Launcher (Slash)"_s},
|
||||
{205, "Tri-Pronged Launcher (Slash) (Motion)"_s},
|
||||
{206, "Heavyblade Launcher (Slash)"_s},
|
||||
{299, "S Base EPod (Slash)"_s},
|
||||
|
||||
{300, "Covering Launcher (Photon)"_s},
|
||||
{301, "Boxhead Launcher (Photon)"_s},
|
||||
|
@ -392,5 +428,6 @@ static const std::map<Int, Containers::StringView> elauncher_pods {
|
|||
{304, "Shelled Launcher (Photon)"_s},
|
||||
{305, "Widearm Launcher (Photon)"_s},
|
||||
{306, "Wingspan Launcher (Photon)"_s},
|
||||
{399, "P Base EPod (Photon)"_s},
|
||||
};
|
||||
// endregion
|
||||
|
|
|
@ -65,18 +65,17 @@ SaveTool::SaveTool(const Arguments& arguments):
|
|||
GL::Renderer::BlendEquation::Add);
|
||||
|
||||
LOG_INFO("Configuring SDL2.");
|
||||
if(SDL_VERSION_ATLEAST(2, 0, 5)) {
|
||||
#if SDL_VERSION_ATLEAST(2,0,5)
|
||||
if(SDL_SetHintWithPriority(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1", SDL_HINT_OVERRIDE) == SDL_TRUE) {
|
||||
LOG_INFO("Clickthrough is enabled.");
|
||||
}
|
||||
else {
|
||||
LOG_WARNING("Clickthrough is disabled.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
#else
|
||||
LOG_WARNING_FORMAT("Clickthrough is disabled: SDL2 version is too old ({}.{}.{})",
|
||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
|
||||
}
|
||||
#endif
|
||||
|
||||
LOG_INFO("Registering custom events.");
|
||||
if((_initEventId = SDL_RegisterEvents(3)) == UnsignedInt(-1)) {
|
||||
|
@ -203,7 +202,8 @@ void SaveTool::drawEvent() {
|
|||
void SaveTool::viewportEvent(ViewportEvent& event) {
|
||||
GL::defaultFramebuffer.setViewport({{}, event.framebufferSize()});
|
||||
|
||||
_imgui.relayout(event.windowSize());
|
||||
const Vector2 size = Vector2{windowSize()}/dpiScaling();
|
||||
_imgui.relayout(size, windowSize(), framebufferSize());
|
||||
}
|
||||
|
||||
void SaveTool::keyPressEvent(KeyEvent& event) {
|
||||
|
|
|
@ -95,12 +95,14 @@ void SaveTool::initialiseGui() {
|
|||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
const auto size = Vector2{windowSize()}/dpiScaling();
|
||||
|
||||
auto reg_font = _rs.getRaw("SourceSansPro-Regular.ttf"_s);
|
||||
ImFontConfig font_config;
|
||||
font_config.FontDataOwnedByAtlas = false;
|
||||
std::strcpy(font_config.Name, "Source Sans Pro");
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<char*>(reg_font.data()), int(reg_font.size()),
|
||||
20.0f, &font_config);
|
||||
20.0f * Float(framebufferSize().x()) / size.x(), &font_config);
|
||||
|
||||
auto icon_font = _rs.getRaw(FONT_ICON_FILE_NAME_FAS);
|
||||
static const ImWchar icon_range[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
|
||||
|
@ -111,12 +113,12 @@ void SaveTool::initialiseGui() {
|
|||
icon_config.OversampleH = icon_config.OversampleV = 1;
|
||||
icon_config.GlyphMinAdvanceX = 18.0f;
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<char*>(icon_font.data()), int(icon_font.size()),
|
||||
16.0f, &icon_config, icon_range);
|
||||
16.0f * Float(framebufferSize().x()) / size.x(), &icon_config, icon_range);
|
||||
|
||||
auto brand_font = _rs.getRaw(FONT_ICON_FILE_NAME_FAB);
|
||||
static const ImWchar brand_range[] = { ICON_MIN_FAB, ICON_MAX_FAB, 0 };
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<char*>(brand_font.data()), int(brand_font.size()),
|
||||
16.0f, &icon_config, brand_range);
|
||||
16.0f * Float(framebufferSize().x()) / size.x(), &icon_config, brand_range);
|
||||
|
||||
auto mono_font = _rs.getRaw("SourceCodePro-Regular.ttf"_s);
|
||||
ImVector<ImWchar> range;
|
||||
|
@ -125,7 +127,7 @@ void SaveTool::initialiseGui() {
|
|||
builder.AddChar(u'š'); // This allows displaying Vladimír Vondruš' name in Corrade's and Magnum's licences.
|
||||
builder.BuildRanges(&range);
|
||||
io.Fonts->AddFontFromMemoryTTF(const_cast<char*>(mono_font.data()), int(mono_font.size()),
|
||||
18.0f, &font_config, range.Data);
|
||||
18.0f * Float(framebufferSize().x()) / size.x(), &font_config, range.Data);
|
||||
|
||||
_imgui = ImGuiIntegration::Context(*ImGui::GetCurrentContext(), windowSize());
|
||||
|
||||
|
|
Loading…
Reference in a new issue