mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
optimized fps draw
This commit is contained in:
@@ -304,8 +304,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "选择长触延迟",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "改变长触延迟。",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d 毫秒",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "显示FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{显示FPS}\n\n切换在游戏窗口角落显FPS指示器。",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "触觉反馈",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{触觉反馈}\n\n切换触摸输入的触觉反馈。",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "界面增强",
|
||||
|
@@ -311,8 +311,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Vybrat dobu dlouhého podržení",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Změnit dobu dlouhého podržení.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d milisekund",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Zobrazit FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Zobrazit FPS}\n\nPřepne viditelnost počítadla snímků za sekundu v rohu obrazovky hry.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Vibrace",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Vibrace}\n\nPřepnout stav vibrací při dotykovém ovládání.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Vylepšení rozhraní",
|
||||
|
@@ -313,8 +313,8 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Select Long Touch Interval",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Change duration of long touch interval.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d milliseconds",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Show FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Show FPS}\n\nToggle the visibility of the Frames Per Second counter in the corner of the game window.",
|
||||
"vcmi.systemOptions.infoboxButton.hover" : "Show Infobox (with FPS)",
|
||||
"vcmi.systemOptions.infoboxButton.help" : "{Show Infobox}\n\nToggle the visibility of the infobox with additional information like frames per second, time and battery charge level (if available) in the corner of the game window.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Haptic feedback",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Haptic feedback}\n\nToggle the haptic feedback on touch inputs.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Interface Enhancements",
|
||||
|
@@ -68,8 +68,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Sélectionner l'intervalle de touche long",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Changer la durée de l'intervalle de touche long.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d millisecondes",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Afficher les FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Show FPS}\n\nAfficher/masquer le compteur de Frames Par Seconde dans le coin de la fenêtre du jeu",
|
||||
|
||||
"vcmi.adventureOptions.infoBarPick.hover" : "Afficher les messages dans le panneau d'information",
|
||||
"vcmi.adventureOptions.infoBarPick.help" : "{Show Messages in Info Panel}\n\nAutant que possible, les messages de jeu de la visite des objets de la carte seront affichés dans le panneau d'informations, au lieu de faire apparaître dans une fenêtre séparée.",
|
||||
|
@@ -313,8 +313,8 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Wähle Dauer für Touch",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Ändere die Dauer für den langen Touch",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d Millisekunden",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "FPS anzeigen",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{FPS anzeigen}\n\n Schaltet die Sichtbarkeit des Zählers für die Bilder pro Sekunde in der Ecke des Spielfensters um.",
|
||||
"vcmi.systemOptions.infoboxButton.hover" : "Infobox anzeigen (mit FPS)",
|
||||
"vcmi.systemOptions.infoboxButton.help" : "{Infobox anzeigen}\n\n Schaltet die Sichtbarkeit einer Infobox für zusätzliche Informationen, wie eines Zählers für die Bilder pro Sekunde, der Uhrzeit oder des Batterieladezustands (wenn verfügbar) in der Ecke des Spielfensters um.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Haptisches Feedback",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Haptisches Feedback}\n\nHaptisches Feedback bei Touch-Eingaben.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Interface Verbesserungen",
|
||||
|
@@ -292,8 +292,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Hosszú érintés időtartamának kiválasztása",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Hosszú érintés időtartamának módosítása.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d milliszekundum",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "FPS megjelenítése",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{FPS megjelenítése}\n\nA másodpercenkénti képkocka számláló láthatóságának váltása a játékablak sarkában.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Rezgő visszacsatolás",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Rezgő visszacsatolás}\n\nA rezgő visszacsatolás engedélyezése vagy tiltása érintőbemeneteknél.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Felület fejlesztések",
|
||||
|
@@ -294,8 +294,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Seleziona intervallo di tocco lungo",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Modifica la durata dell'intervallo di tocco lungo.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d millisecondi",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Mostra FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Mostra FPS}\n\nAttiva o disattiva la visibilità del contatore dei fotogrammi al secondo nell'angolo della finestra di gioco.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Feedback aptico",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Feedback aptico}\n\nAttiva o disattiva il feedback aptico sugli input tattili.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Miglioramenti interfaccia",
|
||||
|
@@ -294,8 +294,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Wybierz czas długiego dotyku",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Nowy czas aktywacji długiego dotyku.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d milisekund",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Pokaż FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Pokaż FPS}\n\n Przełącza widoczność licznika klatek na sekundę (FPS) w rogu okna gry.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Wibracje urządzenia",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Wibracje urządzenia}\n\nWłącz wibracje na urządzeniu dotykowym",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Ulepszenia interfejsu",
|
||||
|
@@ -311,8 +311,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Selecionar Intervalo de Toque Longo",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Muda a duração do intervalo de toque longo.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d milissegundos",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Mostrar QPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Mostra os Quadros Por Segundo}\n\nAtiva ou desativa a visibilidade do contador de Quadros Por Segundo no canto da janela do jogo.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Resposta Tátil",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Resposta Tátil}\n\nAtiva ou desativa a resposta tátil nos toques na tela.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Aprimoramentos da Interface",
|
||||
|
@@ -290,8 +290,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Выбрать интервал длительного касания:",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Изменить интервал длительного касания.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d миллисекунд",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Показывать частоту кадров",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Показывать частоту кадров}\n\nЕсли выбрано, частота кадров в секунду будет показана в верхнем левом углу игрового экрана.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Тактильный отклик",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Тактильный отклик}\n\nиспользовать вибрацию при использовании сенсорного экрана.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Расширенные функции интерфейса",
|
||||
|
@@ -107,8 +107,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Seleccionar Intervalo de Toque Largo",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Cambia la duración del intervalo de toque largo.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d milisegundos",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Mostrar FPS",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Mostrar FPS}\n\nAlternar la visibilidad del contador de Frames Per Second en la esquina de la ventana del juego.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Retroalimentación háptica",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Retroalimentación háptica}\n\nAlternar la retroalimentación háptica en las entradas táctiles.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Mejoras de la interfaz",
|
||||
|
@@ -304,8 +304,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Välj tidsintervall för fördröjd pekskärmsberöringsmeny",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Ändra varaktighetsintervallet för fördröjd beröring.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d millisekunder",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Visar FPS (skärmbilder per sekund)",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Visa FPS}\n\nVisar räknaren för bildrutor per sekund i hörnet av spelfönstret.",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Haptisk återkoppling",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Haptisk feedback}\n\nÄndrar den haptiska feedbacken för berörings-input.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover": "Förbättringar av användargränssnittet",
|
||||
|
@@ -308,8 +308,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover" : "Виберіть інтервал довгого дотику",
|
||||
"vcmi.systemOptions.longTouchMenu.help" : "Змінити тривалість інтервалу довгого дотику.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry" : "%d мілісекунд",
|
||||
"vcmi.systemOptions.framerateButton.hover" : "Лічильник кадрів",
|
||||
"vcmi.systemOptions.framerateButton.help" : "{Лічильник кадрів}\n\n Перемикає видимість лічильника кадрів на секунду у кутку ігрового вікна",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Тактильний відгук",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Тактильний відгук}\n\nВикористовувати вібрацію при використанні сенсорного екрану",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Розширення інтерфейсу",
|
||||
|
@@ -292,8 +292,6 @@
|
||||
"vcmi.systemOptions.longTouchMenu.hover": "Chọn khoảng thời gian chạm giữ",
|
||||
"vcmi.systemOptions.longTouchMenu.help": "Đổi khoảng thời gian chạm giữ.",
|
||||
"vcmi.systemOptions.longTouchMenu.entry": "%d mili giây",
|
||||
"vcmi.systemOptions.framerateButton.hover": "Hiện FPS",
|
||||
"vcmi.systemOptions.framerateButton.help": "{Hiện FPS}\n\nHiện khung hình mỗi giây ở góc cửa sổ trò chơi",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.hover": "Rung khi chạm",
|
||||
"vcmi.systemOptions.hapticFeedbackButton.help": "{Rung khi chạm}\n\nBật/ tắt chế độ rung khi chạm.",
|
||||
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Cải thiện giao diện",
|
||||
|
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "../lib/AsyncRunner.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "../lib/texts/TextOperations.h"
|
||||
|
||||
#include <SDL_render.h>
|
||||
|
||||
@@ -125,8 +126,8 @@ void GameEngine::updateFrame()
|
||||
handleEvents();
|
||||
windows().simpleRedraw();
|
||||
|
||||
if (settings["video"]["showfps"].Bool())
|
||||
drawFPSCounter();
|
||||
if (settings["video"]["infobox"]["show"].Bool())
|
||||
drawInfoBox();
|
||||
|
||||
screenHandlerInstance->updateScreenTexture();
|
||||
|
||||
@@ -184,14 +185,47 @@ Point GameEngine::screenDimensions() const
|
||||
return screenHandlerInstance->getLogicalResolution();
|
||||
}
|
||||
|
||||
void GameEngine::drawFPSCounter()
|
||||
void GameEngine::drawInfoBox()
|
||||
{
|
||||
Canvas target = screenHandler().getScreenCanvas();
|
||||
Rect targetArea(0, screenDimensions().y - 20, 48, 11);
|
||||
std::string fps = std::to_string(framerate().getFramerate())+" FPS";
|
||||
auto font = EFonts::FONT_SMALL;
|
||||
const auto & fontPtr = ENGINE->renderHandler().loadFont(font);
|
||||
|
||||
target.drawColor(targetArea, ColorRGBA(10, 10, 10));
|
||||
target.drawText(targetArea.center(), EFonts::FONT_SMALL, Colors::WHITE, ETextAlignment::CENTER, fps);
|
||||
Canvas target = screenHandler().getScreenCanvas();
|
||||
|
||||
auto powerState = ENGINE->input().getPowerState();
|
||||
std::string powerSymbol = ""; // add symbol if emoji are supported (e.g. VCMI extras)
|
||||
if(fontPtr->canRepresentCharacter("🔋") && powerState.powerState == PowerStateMode::ON_BATTERY)
|
||||
powerSymbol = "🔋 ";
|
||||
else if(fontPtr->canRepresentCharacter("🔌") && powerState.powerState == PowerStateMode::CHARGING)
|
||||
powerSymbol = "🔌 ";
|
||||
|
||||
std::string fps = std::to_string(framerate().getFramerate())+" FPS";
|
||||
std::string time = TextOperations::getFormattedTimeLocal(std::time(nullptr));
|
||||
std::string power = powerState.powerState == PowerStateMode::UNKNOWN ? "" : powerSymbol + std::to_string(powerState.percent) + "%";
|
||||
|
||||
std::string textToDisplay = time + (power.empty() ? "" : " | " + power) + " | " + fps;
|
||||
|
||||
maxInfoBoxTextWidth = std::max(maxInfoBoxTextWidth, static_cast<int>(fontPtr->getStringWidth(textToDisplay))); // do not get smaller (can cause graphical glitches)
|
||||
|
||||
Rect targetArea;
|
||||
std::string edge = settings["video"]["infobox"]["edge"].String();
|
||||
int pos1 = settings["video"]["infobox"]["pos1"].Integer();
|
||||
int pos2 = settings["video"]["infobox"]["pos2"].Integer();
|
||||
|
||||
Point boxSize(maxInfoBoxTextWidth + 4, fontPtr->getLineHeight() + 2);
|
||||
|
||||
if (edge == "topleft")
|
||||
targetArea = Rect(pos2, pos1, boxSize.x, boxSize.y);
|
||||
else if (edge == "topright")
|
||||
targetArea = Rect(screenDimensions().x - pos2 - boxSize.x, pos1, boxSize.x, boxSize.y);
|
||||
else if (edge == "bottomleft")
|
||||
targetArea = Rect(pos2, screenDimensions().y - pos1 - boxSize.y, boxSize.x, boxSize.y);
|
||||
else if (edge == "bottomright")
|
||||
targetArea = Rect(screenDimensions().x - pos2 - boxSize.x, screenDimensions().y - pos1 - boxSize.y, boxSize.x, boxSize.y);
|
||||
|
||||
target.drawColor(targetArea.resize(1), Colors::BRIGHT_YELLOW);
|
||||
target.drawColor(targetArea, ColorRGBA(0, 0, 0));
|
||||
target.drawText(targetArea.center(), font, Colors::WHITE, ETextAlignment::CENTER, textToDisplay);
|
||||
}
|
||||
|
||||
bool GameEngine::amIGuiThread()
|
||||
|
@@ -57,9 +57,11 @@ private:
|
||||
|
||||
IGameEngineUser *engineUser = nullptr;
|
||||
|
||||
int maxInfoBoxTextWidth = 0;
|
||||
|
||||
void updateFrame();
|
||||
void handleEvents(); //takes events from queue and calls interested objects
|
||||
void drawFPSCounter(); // draws the FPS to the upper left corner of the screen
|
||||
void drawInfoBox(); // draws box with additional infos (e.g. fps)
|
||||
|
||||
public:
|
||||
std::mutex interfaceMutex;
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_timer.h>
|
||||
#include <SDL_clipboard.h>
|
||||
#include <SDL_power.h>
|
||||
|
||||
InputHandler::InputHandler()
|
||||
: enableMouse(settings["input"]["enableMouse"].Bool())
|
||||
@@ -148,6 +149,21 @@ void InputHandler::copyToClipBoard(const std::string & text)
|
||||
SDL_SetClipboardText(text.c_str());
|
||||
}
|
||||
|
||||
PowerState InputHandler::getPowerState()
|
||||
{
|
||||
int seconds;
|
||||
int percent;
|
||||
auto sdlPowerState = SDL_GetPowerInfo(&seconds, &percent);
|
||||
|
||||
PowerStateMode powerState = PowerStateMode::UNKNOWN;
|
||||
if(sdlPowerState == SDL_POWERSTATE_ON_BATTERY)
|
||||
powerState = PowerStateMode::ON_BATTERY;
|
||||
else if(sdlPowerState == SDL_POWERSTATE_CHARGING || sdlPowerState == SDL_POWERSTATE_CHARGED)
|
||||
powerState = PowerStateMode::CHARGING;
|
||||
|
||||
return PowerState{powerState, seconds, percent};
|
||||
}
|
||||
|
||||
std::vector<SDL_Event> InputHandler::acquireEvents()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(eventsMutex);
|
||||
|
@@ -32,6 +32,19 @@ enum class InputMode
|
||||
CONTROLLER
|
||||
};
|
||||
|
||||
enum class PowerStateMode
|
||||
{
|
||||
UNKNOWN,
|
||||
CHARGING,
|
||||
ON_BATTERY
|
||||
};
|
||||
|
||||
struct PowerState {
|
||||
PowerStateMode powerState;
|
||||
int seconds;
|
||||
int percent;
|
||||
};
|
||||
|
||||
class InputHandler
|
||||
{
|
||||
std::vector<SDL_Event> eventsQueue;
|
||||
@@ -111,4 +124,5 @@ public:
|
||||
InputMode getCurrentInputMode();
|
||||
|
||||
void copyToClipBoard(const std::string & text);
|
||||
PowerState getPowerState();
|
||||
};
|
||||
|
@@ -152,9 +152,10 @@ GeneralOptionsTab::GeneralOptionsTab()
|
||||
{
|
||||
selectLongTouchDuration();
|
||||
});
|
||||
addCallback("framerateChanged", [](bool value)
|
||||
addCallback("infoboxChanged", [](bool value)
|
||||
{
|
||||
setBoolSetting("video", "showfps", value);
|
||||
Settings gameRes = settings.write["video"]["infobox"];
|
||||
gameRes["show"].Bool() = value;
|
||||
});
|
||||
addCallback("hapticFeedbackChanged", [](bool value)
|
||||
{
|
||||
@@ -225,8 +226,8 @@ GeneralOptionsTab::GeneralOptionsTab()
|
||||
if (fullscreenExclusiveCheckbox)
|
||||
fullscreenExclusiveCheckbox->setSelected(settings["video"]["fullscreen"].Bool() && settings["video"]["realFullscreen"].Bool());
|
||||
|
||||
std::shared_ptr<CToggleButton> framerateCheckbox = widget<CToggleButton>("framerateCheckbox");
|
||||
framerateCheckbox->setSelected(settings["video"]["showfps"].Bool());
|
||||
std::shared_ptr<CToggleButton> infoboxCheckbox = widget<CToggleButton>("infoboxCheckbox");
|
||||
infoboxCheckbox->setSelected(settings["video"]["infobox"]["show"].Bool());
|
||||
|
||||
std::shared_ptr<CToggleButton> hapticFeedbackCheckbox = widget<CToggleButton>("hapticFeedbackCheckbox");
|
||||
if (hapticFeedbackCheckbox)
|
||||
|
@@ -210,7 +210,7 @@
|
||||
"spellbookAnimation",
|
||||
"driver",
|
||||
"displayIndex",
|
||||
"showfps",
|
||||
"infobox",
|
||||
"targetfps",
|
||||
"vsync",
|
||||
"fontsType",
|
||||
@@ -270,9 +270,16 @@
|
||||
"type" : "number",
|
||||
"default" : 0
|
||||
},
|
||||
"showfps" : {
|
||||
"type" : "boolean",
|
||||
"default" : false
|
||||
"infobox" : {
|
||||
"type" : "object",
|
||||
"additionalProperties" : false,
|
||||
"required" : [ "show", "edge", "pos1", "pos2" ],
|
||||
"properties" : {
|
||||
"show" : { "type" : "boolean", "default" : false },
|
||||
"edge" : { "type" : "string", "enum" : [ "topleft", "topright", "bottomleft", "bottomright" ], "default" : "bottomleft" },
|
||||
"pos1" : { "type" : "number", "default" : 5 },
|
||||
"pos2" : { "type" : "number", "default" : 7 }
|
||||
}
|
||||
},
|
||||
"targetfps" : {
|
||||
"type" : "number",
|
||||
|
@@ -50,7 +50,7 @@
|
||||
"created" : "desktop"
|
||||
},
|
||||
{
|
||||
"text": "vcmi.systemOptions.framerateButton.hover"
|
||||
"text": "vcmi.systemOptions.infoboxButton.hover"
|
||||
},
|
||||
{
|
||||
"text": "vcmi.systemOptions.enableLargeSpellbookButton.hover"
|
||||
@@ -136,9 +136,9 @@
|
||||
"created" : "desktop"
|
||||
},
|
||||
{
|
||||
"name": "framerateCheckbox",
|
||||
"help": "vcmi.systemOptions.framerateButton",
|
||||
"callback": "framerateChanged"
|
||||
"name": "infoboxCheckbox",
|
||||
"help": "vcmi.systemOptions.infoboxButton",
|
||||
"callback": "infoboxChanged"
|
||||
},
|
||||
{
|
||||
"name": "enableLargeSpellbookCheckbox",
|
||||
|
Reference in New Issue
Block a user