@@ -114,6 +114,16 @@ void pnlInventory_t::onClick_Options(glictPos* relmousepos, glictContainer* call
114
114
/* gameclass->msgBox(gettext("This functionality is not yet finished"),"TODO");*/
115
115
}
116
116
117
+ void winReadable_t::onClose (glictPos* pos, glictContainer* caller){
118
+ // TODO
119
+ winReadable_t* win = (winReadable_t*)caller->GetCustomData ();
120
+ GM_Gameworld* gameclass = (GM_Gameworld*)g_game;
121
+ win->window .SetVisible (false );
122
+ if (win->dispItem ->isWriteable ()){
123
+ gameclass->m_protocol ->sendTextWindow (win->windowID , win->txtText .GetCaption ());
124
+ }
125
+ }
126
+
117
127
GM_Gameworld::GM_Gameworld () : pnlMap(&m_automap)
118
128
{
119
129
DEBUGPRINT (DEBUGPRINT_LEVEL_OBLIGATORY, DEBUGPRINT_NORMAL, " Starting gameworld...\n " );
@@ -247,6 +257,9 @@ GM_Gameworld::GM_Gameworld() : pnlMap(&m_automap)
247
257
desktop.AddObject (&winMove.window );
248
258
winMove.window .SetVisible (false );
249
259
260
+ desktop.AddObject (&winReadable.window );
261
+ winReadable.window .SetVisible (false );
262
+
250
263
desktop.AddObject (&pnlConsoleContainer);
251
264
// pnlConsoleContainer.SetBGActiveness(false);
252
265
@@ -1613,6 +1626,15 @@ void GM_Gameworld::closeTradeWindow()
1613
1626
#endif
1614
1627
}
1615
1628
1629
+ void GM_Gameworld::onOpenItemText (int windowId, int itemid, int maxTextLenght,
1630
+ const std::string& text, const std::string& lastChange,
1631
+ const std::string& lastChangeDate)
1632
+ {
1633
+ // rest of stuff; todo
1634
+ winReadable.open (itemid, windowId, text, lastChange, lastChangeDate);
1635
+ centerWindow (&winReadable.window );
1636
+ }
1637
+
1616
1638
void GM_Gameworld::onUpdatePlayerCash (uint32_t newcash) {
1617
1639
winShop.setCash (newcash);
1618
1640
}
0 commit comments