Skip to content

Commit 6c977de

Browse files
committed
Added script function SetUnseenLines
1 parent 120c06f commit 6c977de

File tree

7 files changed

+32
-10
lines changed

7 files changed

+32
-10
lines changed

doc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ BEGIN_DISPATCH_MAP(CMUSHclientDoc, CDocument)
614614
DISP_FUNCTION(CMUSHclientDoc, "SetTitle", SetTitle, VT_EMPTY, VTS_BSTR)
615615
DISP_FUNCTION(CMUSHclientDoc, "SetMainTitle", SetMainTitle, VT_EMPTY, VTS_BSTR)
616616
DISP_FUNCTION(CMUSHclientDoc, "StopEvaluatingTriggers", StopEvaluatingTriggers, VT_EMPTY, VTS_BOOL)
617+
DISP_FUNCTION(CMUSHclientDoc, "SetUnseenLines", SetUnseenLines, VT_EMPTY, VTS_I4)
617618
DISP_PROPERTY_PARAM(CMUSHclientDoc, "NormalColour", GetNormalColour, SetNormalColour, VT_I4, VTS_I2)
618619
DISP_PROPERTY_PARAM(CMUSHclientDoc, "BoldColour", GetBoldColour, SetBoldColour, VT_I4, VTS_I2)
619620
DISP_PROPERTY_PARAM(CMUSHclientDoc, "CustomColourText", GetCustomColourText, SetCustomColourText, VT_I4, VTS_I2)
@@ -7908,3 +7909,4 @@ void CMUSHclientDoc::FixInputWrap()
79087909
} // end of CMUSHclientDoc::FixInputWrap()
79097910

79107911

7912+

doc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,6 +2819,7 @@ class CMUSHclientDoc : public CDocument
28192819
afx_msg void SetTitle(LPCTSTR Title);
28202820
afx_msg void SetMainTitle(LPCTSTR Title);
28212821
afx_msg void StopEvaluatingTriggers(BOOL AllPlugins);
2822+
afx_msg void SetUnseenLines(long Counter);
28222823
afx_msg long GetNormalColour(short WhichColour);
28232824
afx_msg void SetNormalColour(short WhichColour, long nNewValue);
28242825
afx_msg long GetBoldColour(short WhichColour);

mushclient.cnt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@
498498
3 SetTitle=FNC_SetTitle
499499
3 SetToolBarPosition=FNC_SetToolBarPosition
500500
3 SetTriggerOption=FNC_SetTriggerOption
501+
3 SetUnseenLines=FNC_SetUnseenLines
501502
3 SetVariable=FNC_SetVariable
502503
3 SetWorldWindowStatus=FNC_SetWorldWindowStatus
503504
3 ShowInfoBar=FNC_ShowInfoBar

mushclient.odl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ library MUSHclient
7070
[id(44)] long SetCommand(BSTR Message);
7171
[id(45)] BSTR GetNotes();
7272
[id(46)] void SetNotes(BSTR Message);
73-
[id(412), propget] long NormalColour(short WhichColour);
74-
[id(412), propput] void NormalColour(short WhichColour, long nNewValue);
75-
[id(413), propget] long BoldColour(short WhichColour);
76-
[id(413), propput] void BoldColour(short WhichColour, long nNewValue);
77-
[id(414), propget] long CustomColourText(short WhichColour);
78-
[id(414), propput] void CustomColourText(short WhichColour, long nNewValue);
79-
[id(415), propget] long CustomColourBackground(short WhichColour);
80-
[id(415), propput] void CustomColourBackground(short WhichColour, long nNewValue);
73+
[id(413), propget] long NormalColour(short WhichColour);
74+
[id(413), propput] void NormalColour(short WhichColour, long nNewValue);
75+
[id(414), propget] long BoldColour(short WhichColour);
76+
[id(414), propput] void BoldColour(short WhichColour, long nNewValue);
77+
[id(415), propget] long CustomColourText(short WhichColour);
78+
[id(415), propput] void CustomColourText(short WhichColour, long nNewValue);
79+
[id(416), propget] long CustomColourBackground(short WhichColour);
80+
[id(416), propput] void CustomColourBackground(short WhichColour, long nNewValue);
8181
[id(47)] void Redraw();
8282
[id(48)] long ResetTimer(BSTR TimerName);
8383
[id(49)] void SetOutputFont(BSTR FontName, short PointSize);
@@ -443,6 +443,7 @@ library MUSHclient
443443
[id(409)] void SetTitle(BSTR Title);
444444
[id(410)] void SetMainTitle(BSTR Title);
445445
[id(411)] void StopEvaluatingTriggers(BOOL AllPlugins);
446+
[id(412)] void SetUnseenLines(long Counter);
446447
//}}AFX_ODL_METHOD
447448

448449
};

scripting/functionlist.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ tInternalFunctionsTable InternalFunctionsTable [] = {
356356
{ "SetTitle" , "( Title )" } ,
357357
{ "SetToolBarPosition" , "( Which , Float , Side , Top , Left )" } ,
358358
{ "SetTriggerOption" , "( TriggerName , OptionName , Value )" } ,
359+
{ "SetUnseenLines" , "( Counter )" } ,
359360
{ "SetVariable" , "( VariableName , Contents )" } ,
360361
{ "SetWorldWindowStatus" , "( Parameter )" } ,
361362
{ "ShiftTabCompleteItem" , "( Item )" } ,

scripting/lua_methods.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5500,6 +5500,15 @@ static int L_SetTriggerOption (lua_State *L)
55005500
return 1; // number of result fields
55015501
} // end of L_SetTriggerOption
55025502

5503+
//----------------------------------------
5504+
// world.SetUnseenLines
5505+
//----------------------------------------
5506+
static int L_SetUnseenLines (lua_State *L)
5507+
{
5508+
CMUSHclientDoc *pDoc = doc (L);
5509+
pDoc->SetUnseenLines (my_checknumber (L, 1));
5510+
return 0; // number of result fields
5511+
} // end of SetUnseenLines
55035512

55045513
//----------------------------------------
55055514
// world.SetVariable
@@ -7034,6 +7043,7 @@ static const struct luaL_Reg worldlib [] =
70347043
{"SetTitle", L_SetTitle},
70357044
{"SetToolBarPosition", L_SetToolBarPosition},
70367045
{"SetTriggerOption", L_SetTriggerOption},
7046+
{"SetUnseenLines", L_SetUnseenLines},
70377047
{"SetVariable", L_SetVariable},
70387048
{"SetWorldWindowStatus", L_SetWorldWindowStatus},
70397049
{"ShiftTabCompleteItem", L_ShiftTabCompleteItem},

scripting/methods/methods_output.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
// SetScroll
4141
// SetTitle
4242
// SetToolBarPosition
43+
// SetUnseenLines
4344
// SetWorldWindowStatus
4445
// TextRectangle
4546
// Transparency
@@ -836,11 +837,16 @@ void CMUSHclientDoc::SetTitle(LPCTSTR Title)
836837
} // end of being a CMUSHView
837838
} // end of loop through views
838839

839-
}
840+
} // end of CMUSHclientDoc::SetTitle
840841

841842

842843
void CMUSHclientDoc::SetMainTitle(LPCTSTR Title)
843844
{
844845
m_strMainWindowTitle = Title;
845846
Frame.FixUpTitleBar ();
846-
}
847+
} // end of CMUSHclientDoc::SetMainTitle
848+
849+
void CMUSHclientDoc::SetUnseenLines(long Counter)
850+
{
851+
m_new_lines = Counter;
852+
} // end of CMUSHclientDoc::SetUnseenLines

0 commit comments

Comments
 (0)