Comment tweaks, build tweaks, bugfixes

I've also disabled the "screen trick". It was ugly as hell.
This commit is contained in:
2015-08-24 14:32:54 +10:00
parent 188a6805bf
commit ffe5c80117
18 changed files with 22 additions and 105 deletions
+1 -1
View File
@@ -304,7 +304,7 @@ void LobbyMenu::SendJoinRequest() {
void LobbyMenu::SendLoginRequest() {
//NOTE: high cohesion
//TODO: have a separate login screen
//TODO: (9) have a separate login screen
ClientPacket packet;
packet.type = SerialPacketType::LOGIN_REQUEST;
packet.clientIndex = clientIndex;
+1 -1
View File
@@ -63,7 +63,7 @@ MainMenu::MainMenu() {
//text box
textBox.PushLine(GetRenderer(), font, "Thanks for playing!", {255, 255, 255, 255});
textBox.PushLine(GetRenderer(), font, "You can get the latest version at: ", {255, 255, 255, 255});
textBox.PushLine(GetRenderer(), font, "krgamestudios.com", {255, 255, 255, 255}); //TODO: click to open the website/update
textBox.PushLine(GetRenderer(), font, "krgamestudios.com", {255, 255, 255, 255}); //TODO: (9) click to open the website/update
//debug
//
+6 -7
View File
@@ -29,21 +29,21 @@
SplashScreen::SplashScreen(SDL_Window* w) {
//fit the screen to the logo
//TODO: refactor the code for this window trick
//NOTE: not using this window trick
window = w;
SDL_GetWindowSize(window, &windowWidth, &windowHeight);
logo.Load(GetRenderer(), ConfigUtility::GetSingleton()["dir.logos"] + "krstudios.png");
SDL_SetWindowSize(window, logo.GetClipW(), logo.GetClipH());
SDL_RenderSetLogicalSize(GetRenderer(), logo.GetClipW(), logo.GetClipH());
// SDL_SetWindowSize(window, logo.GetClipW(), logo.GetClipH());
// SDL_RenderSetLogicalSize(GetRenderer(), logo.GetClipW(), logo.GetClipH());
startTick = std::chrono::steady_clock::now();
}
SplashScreen::~SplashScreen() {
SDL_SetWindowSize(window, windowWidth, windowHeight);
SDL_RenderSetLogicalSize(GetRenderer(), windowWidth, windowHeight);
// SDL_SetWindowSize(window, windowWidth, windowHeight);
// SDL_RenderSetLogicalSize(GetRenderer(), windowWidth, windowHeight);
}
//-------------------------
@@ -51,7 +51,7 @@ SplashScreen::~SplashScreen() {
//-------------------------
void SplashScreen::FrameStart() {
//TODO: config flag to change the delay
//TODO: (0) config flag to change the delay
if (std::chrono::steady_clock::now() - startTick > std::chrono::duration<int>(3)) {
SetSceneSignal(SceneSignal::MAINMENU);
}
@@ -60,6 +60,5 @@ void SplashScreen::FrameStart() {
void SplashScreen::RenderFrame(SDL_Renderer* renderer) {
int w = 0, h = 0;
SDL_RenderGetLogicalSize(renderer, &w, &h);
//TODO: fix logo position
logo.DrawTo(renderer, (w - logo.GetClipW()) / 2, (h - logo.GetClipH()) / 2);
}