| 89 | #endif |
| 90 | |
| 91 | Window_Message::Window_Message(int ix, int iy, int iwidth, int iheight) : |
| 92 | Window_Selectable(ix, iy, iwidth, iheight), |
| 93 | number_input_window(new Window_NumberInput(0, 0)), |
| 94 | gold_window(new Window_Gold(Player::screen_width - Player::menu_offset_x - gold_window_width, Player::menu_offset_y, gold_window_width, gold_window_height)), |
| 95 | pending_message(Game_Message::CommandCodeInserter) |
| 96 | { |
| 97 | SetContents(Bitmap::Create(width - 16, height - 16)); |
| 98 | |
| 99 | // 2k3 transparent message boxes |
| 100 | bool msg_transparent = Player::IsRPG2k3() |
| 101 | // if the flag is set .. |
| 102 | && (lcf::Data::battlecommands.transparency == lcf::rpg::BattleCommands::Transparency_transparent) |
| 103 | // if we're not in battle, or if we are in battle but not using mode A |
| 104 | && (!Game_Battle::IsBattleRunning() || lcf::Data::battlecommands.battle_type != lcf::rpg::BattleCommands::BattleType_traditional) |
| 105 | // RPG_RT < 1.11 bug, map messages were not transparent if the battle type was mode A. |
| 106 | && (Player::IsRPG2k3E() || lcf::Data::battlecommands.battle_type != lcf::rpg::BattleCommands::BattleType_traditional); |
| 107 | if (msg_transparent) { |
| 108 | SetBackOpacity(160); |
| 109 | } |
| 110 | gold_window->SetBackOpacity(GetBackOpacity()); |
| 111 | |
| 112 | SetVisible(false); |
| 113 | // Above other windows |
| 114 | SetZ(Priority_Window + 100); |
| 115 | |
| 116 | active = true; |
| 117 | SetIndex(-1); |
| 118 | text_color = Font::ColorDefault; |
| 119 | |
| 120 | number_input_window->SetVisible(false); |
| 121 | |
| 122 | gold_window->SetVisible(false); |
| 123 | |
| 124 | Main_Data::game_system->ClearMessageFace(); |
| 125 | Game_Message::SetWindow(this); |
| 126 | } |
| 127 | |
| 128 | Window_Message::~Window_Message() { |
| 129 | if (Game_Message::GetWindow() == this) { |
nothing calls this directly
no test coverage detected