mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 21:40:15 +00:00
fixed the dialogue history topic selection
This commit is contained in:
parent
3b76f6dcf4
commit
161d519206
@ -49,8 +49,15 @@ DialogueWindow::DialogueWindow(WindowManager& parWindowManager,MWWorld::Environm
|
||||
//History view
|
||||
getWidget(history, "History");
|
||||
history->setOverflowToTheLeft(true);
|
||||
history->getClient()->eventMouseButtonClick += MyGUI::newDelegate(this, &DialogueWindow::onHistoryClicked);
|
||||
history->setMaxTextLength(1000000);
|
||||
Widget* eventbox;
|
||||
|
||||
//An EditBox cannot receive mouse click events, so we use an
|
||||
//invisible widget on top of the editbox to receive them
|
||||
/// \todo scrolling the dialogue history with the mouse wheel doesn't work using this solution
|
||||
getWidget(eventbox, "EventBox");
|
||||
eventbox->eventMouseButtonClick += MyGUI::newDelegate(this, &DialogueWindow::onHistoryClicked);
|
||||
|
||||
//Topics list
|
||||
getWidget(topicsList, "TopicsList");
|
||||
topicsList->setScrollVisible(true);
|
||||
@ -68,7 +75,7 @@ DialogueWindow::DialogueWindow(WindowManager& parWindowManager,MWWorld::Environm
|
||||
|
||||
void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
ISubWidgetText* t = history->getSubWidgetText();
|
||||
ISubWidgetText* t = history->getClient()->getSubWidgetText();
|
||||
if(t == nullptr)
|
||||
return;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace MWGui
|
||||
{
|
||||
using namespace MyGUI;
|
||||
class DialogeHistory : public MyGUI::Edit
|
||||
class DialogeHistory : public MyGUI::EditBox
|
||||
{
|
||||
MYGUI_RTTI_DERIVED( DialogeHistory )
|
||||
public:
|
||||
|
@ -15,6 +15,8 @@
|
||||
<Property key="Text_FontHeight" value="18"/>
|
||||
<Property key="Edit_MultiLine" value="1" />
|
||||
<Property key="Edit_VisibleVScroll" value="1" />
|
||||
<!-- invisible box for receiving mouse events -->
|
||||
<Widget type="Widget" skin="" position="0 0 400 375" name="EventBox" align="ALIGN_LEFT ALIGN_TOP STRETCH"/>
|
||||
</Widget>
|
||||
|
||||
<!-- The disposition bar-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user