Windows: Set a titlebar icon
This commit is contained in:
@@ -177,6 +177,8 @@ void adjust_window_mode() {
|
||||
}
|
||||
r = windRect;
|
||||
}
|
||||
ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon");
|
||||
mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr());
|
||||
redraw_screen(REFRESH_NONE);
|
||||
if(text_sbar) {
|
||||
text_sbar->relocate({ul.x + 546,ul.y + 283});
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#include "pc.menus.hpp"
|
||||
#include "winutil.hpp"
|
||||
#include "cursors.hpp"
|
||||
#include "restypes.hpp"
|
||||
|
||||
cUniverse univ;
|
||||
|
||||
@@ -112,6 +113,8 @@ void Initialize(void) {
|
||||
// The window is full screen size, made smaller to make it more visible.
|
||||
int height = 440 + getMenubarHeight();
|
||||
mainPtr.create(sf::VideoMode(590, height), "Blades of Exile Character Editor", sf::Style::Titlebar | sf::Style::Close);
|
||||
ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon");
|
||||
mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr());
|
||||
init_menubar();
|
||||
}
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include "cursors.hpp"
|
||||
#include "dlogutil.hpp"
|
||||
#include "scen.menus.hpp"
|
||||
#include "restypes.hpp"
|
||||
|
||||
/* Globals */
|
||||
bool All_Done = false;
|
||||
@@ -138,6 +139,8 @@ void Initialize(void) {
|
||||
windRect.offset(0,18);
|
||||
mainPtr.create(sf::VideoMode(windRect.width(), windRect.height()), "Blades of Exile Scenario Editor", sf::Style::Titlebar | sf::Style::Close);
|
||||
mainPtr.setPosition(windRect.topLeft());
|
||||
ImageRsrc& icon = *ResMgr::get<ImageRsrc>("icon");
|
||||
mainPtr.setIcon(icon.getSize().x, icon.getSize().y, icon.getPixelsPtr());
|
||||
init_menubar();
|
||||
right_sbar_rect.top = RIGHT_AREA_UL_Y - 1;
|
||||
right_sbar_rect.left = RIGHT_AREA_UL_X + RIGHT_AREA_WIDTH - 1 - 16;
|
||||
|
Reference in New Issue
Block a user