Comment tweaks, build tweaks, bugfixes
I've also disabled the "screen trick". It was ugly as hell.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user