Override Gui's 320/200px setting for Main Screen

Started by AndreasBlack, Sun 03/09/2023 22:27:39

Previous topic - Next topic

AndreasBlack

Someone told me long ago if you make a 320x200 game just make a 320x200 game, well yeah...Problem is when you save your game and look at the Thumbleweed save states, you almost can't see what it is a friend told me! (laugh) When loading the Mainscreen i've done a Game.Camera.SetSize(1920x1200); but that doesn't change the Gui's internal resolution which seems to still be 320x200 game's default setting, unclear ???

Thanks!

Crimson Wizard

#1
Indeed, you cannot change game resolution at runtime, it's fixed, and gui resolution is always equal to the game's.

Game.Camera.SetAt changes camera's position in the room, not camera's zoom.
Doing Camera.SetSize will change it's zoom, but it will zoom the room, not the GUI. There's no command to zoom into GUI at the moment.
https://adventuregamestudio.github.io/ags-manual/Camera.html

It seems you are speaking of a game screenshot loaded from saves?.. It should be the size of the game resolution, but if it's placed on GUI, then it may be resized prior to that. Find where it is loaded in script, and make it larger, perhaps that would be a solution?

AndreasBlack

#2
Ahh, my bad i wrote wrong i meant SetSize, will edit it! and yes, indeed i'm talking about the Screenshot/Savestate's "look" that's just pixelated and barely can be seen where you were in the game previously! I will try your suggestion! (nod)

Unclear if this is where i should be changing things

Code: ags
// Show control panel
static void OptionGui::ShowOptions() 
{
  if (!customSaveData.save_scheduled) {
   
                                  
    OptionGui.CreateScreenshot(customSaveData.font);
 
    gOptions.Visible = true;
    
    //or perhaps..


//  Prepare a screenshot
static void OptionGui::CreateScreenshot(FontType font)
{
  customSaveData.saveSlotString = TimeCount.GeneratePlayTimeString();
  
  int btnWidth  = Game.SpriteWidth[customLoadData.slotSprite];
  int btnHeight = Game.SpriteHeight[customLoadData.slotSprite];  
  
  saveScreenshot = DynamicSprite.CreateFromScreenShot();
  
  saveScreenshot.Crop(0, 0,  ScreenWidth, ScreenHeight - gMain.Height); //TODO : remove reference to gMain
  saveScreenshot.Resize(btnWidth-4, btnHeight-6);
  
  DrawingSurface *tempSurf = saveScreenshot.GetDrawingSurface();
  tempSurf.DrawingColor = 15;
  tempSurf.DrawString(0, 1, font, customSaveData.saveSlotString.Substring(0, customSaveData.saveSlotString.IndexOf(";")));
  
  String st = customSaveData.saveSlotString;
  tempSurf.DrawString(0, btnHeight-15, font, st.Substring(st.IndexOf(";")+1, st.Length));
  tempSurf.Release();  
}
    
  }

SMF spam blocked by CleanTalk