Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/code/BlockGameSdl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class BlockGameSdl : public BlockGame {
std::string strHolder;
strHolder = std::to_string(this->GetScore()+this->GetHandicap());
player_score.SetText(strHolder);
player_score.Draw(globalData.screen, this->GetTopX()+border.score_label_offset.first,this->GetTopY()+border.score_label_offset.second+22, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
player_score.Draw(globalData.screen, this->GetTopX()+border.score_field_offset.first,this->GetTopY()+border.score_field_offset.second, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
if (this->GetAIenabled()) {
player_name.SetText(_("AI"));
}
Expand Down Expand Up @@ -570,14 +570,14 @@ class BlockGameSdl : public BlockGame {
}
player_time.SetText(strHolder);
}
player_time.Draw(globalData.screen, this->GetTopX()+border.time_label_offset.first,this->GetTopY()+border.time_label_offset.second+22, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
player_time.Draw(globalData.screen, this->GetTopX()+border.time_field_offset.first,this->GetTopY()+border.time_field_offset.second, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
strHolder = std::to_string(this->GetChains());
player_chain.SetText(strHolder);
player_chain.Draw(globalData.screen, this->GetTopX()+border.chain_label_offset.first,this->GetTopY()+border.chain_label_offset.second+22, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
player_chain.Draw(globalData.screen, this->GetTopX()+border.chain_field_offset.first,this->GetTopY()+border.chain_field_offset.second, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
//drawspeedLevel:
strHolder = std::to_string(this->GetSpeedLevel());
player_speed.SetText(strHolder);
player_speed.Draw(globalData.screen, this->GetTopX()+border.speed_label_offset.first,this->GetTopY()+border.speed_label_offset.second+22, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
player_speed.Draw(globalData.screen, this->GetTopX()+border.speed_field_offset.first,this->GetTopY()+border.speed_field_offset.second, sago::SagoTextField::Alignment::left, sago::SagoTextField::VerticalAlignment::top, &globalData.logicalResize);
if ((this->isStageClear()) &&(this->GetTopY()+700+50*(this->GetStageClearLimit()-this->GetLinesCleared())-this->GetPixels()-1<600+this->GetTopY())) {
oldBubleX = this->GetTopX()+280;
oldBubleY = this->GetTopY()+650+50*(this->GetStageClearLimit()-this->GetLinesCleared())-this->GetPixels()-1;
Expand Down
16 changes: 16 additions & 0 deletions source/code/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Source information and contacts persons can be found at

#include "editor/SagoTextureSelector.hpp"
#include "puzzle_editor/PuzzleEditorState.hpp"
#include "theme_editor/ThemeEditorState.hpp"
#include "SagoImGui.hpp"

/*******************************************************************************
Expand Down Expand Up @@ -930,6 +931,7 @@ static void ParseArguments(int argc, char* argv[], globalConfig& conf) {
("always-sixteen-nine", "Use 16:9 format even in Window mode")
("editor", "Start the sprite editor/browser")
("puzzle-editor", "Start the build in puzzle editor")
("theme-editor", "Start the theme editor")
("puzzle-level-file", boost::program_options::value<std::string>(), "Sets the default puzzle file to load")
("puzzle-single-level", boost::program_options::value<int>(), "Start the specific puzzle level directly")
#ifdef REPLAY_IMPLEMENTED
Expand Down Expand Up @@ -1031,6 +1033,9 @@ static void ParseArguments(int argc, char* argv[], globalConfig& conf) {
if (vm.count("puzzle-editor")) {
puzzleEditor = true;
}
if (vm.count("theme-editor")) {
themeEditor = true;
}
if (vm.count("puzzle-level-file")) {
conf.puzzleName = vm["puzzle-level-file"].as<std::string>();
}
Expand Down Expand Up @@ -1335,6 +1340,17 @@ int main(int argc, char* argv[]) {
RunImGuiGameState(s);
ImGui::SaveIniSettingsToDisk(imgui_inifile.c_str());
}
else if (themeEditor) {
InitImGui(sdlWindow, renderer, globalData.xsize, globalData.ysize);
ImGuiIO& io = ImGui::GetIO();
io.IniFilename = nullptr;
std::string imgui_inifile = getPathToSaveFiles() + "/imgui_theme_editor.ini";
ImGui::LoadIniSettingsFromDisk(imgui_inifile.c_str());
ThemeEditorState s;
s.Init();
RunImGuiGameState(s);
ImGui::SaveIniSettingsToDisk(imgui_inifile.c_str());
}
else if (globalData.replayArgument.length()) {
ReplayPlayer rp;
RunGameState(rp);
Expand Down
1 change: 1 addition & 0 deletions source/code/mainVars.inc
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ bool twoPlayers; //True if two playerImGui_ImplSDL2_ProcessEvent(&event);s ar
static bool singlePuzzle = false;
static bool editor = false;
static bool puzzleEditor = false;
static bool themeEditor = false;
static int singlePuzzleNr = 0;
static std::string singlePuzzleFile;

Expand Down
Loading
Loading