graphics: continue to change code to store some images as Texture...
This commit is contained in:
@@ -239,7 +239,7 @@ void draw_main_screen() {
|
||||
tileImage(mainPtr,windRect,bg[12]);
|
||||
mainPtr.setView(mainView);
|
||||
|
||||
auto const & icon_gworld = *ResMgr::textures.get("icon");
|
||||
auto const &icon_gworld = *ResMgr::textures.get("icon");
|
||||
dest_rec = source_rect = rectangle(icon_gworld);
|
||||
dest_rec.offset(23, 16);
|
||||
rect_draw_some_item(icon_gworld,source_rect,mainPtr,dest_rec);
|
||||
@@ -342,7 +342,7 @@ void draw_items() {
|
||||
frame_dlog_rect(mainPtr,name_rect); // draw the frame
|
||||
return; // If PC is dead, it has no items
|
||||
}
|
||||
sf::Texture& invenbtn_gworld = *ResMgr::graphics.get("invenbtns");
|
||||
auto const & invenbtn_gworld = *ResMgr::textures.get("invenbtns");
|
||||
for(short i = 0; i < univ.party[current_active_pc].items.size(); i++) // Loop through items and draw each
|
||||
if(univ.party[current_active_pc].items[i].variety != eItemType::NO_ITEM) { // i.e. does item exist
|
||||
std::string to_draw = std::to_string(i + 1) + ". ";
|
||||
|
@@ -169,7 +169,7 @@ void adjust_window (sf::RenderWindow& mainPtr, sf::View& mainView) {
|
||||
mainPtr.setView(mainView);
|
||||
|
||||
#ifndef SFML_SYSTEM_MAC // This overrides Dock icon on OSX, which isn't what we want at all
|
||||
const ImageRsrc& icon = ResMgr::graphics.get("icon", true);
|
||||
auto const & icon = *ResMgr::textures.get("icon", true);
|
||||
mainPtr.setIcon(icon->getSize().x, icon->getSize().y, icon->copyToImage().getPixelsPtr());
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user