mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 21:51:17 +02:00
uncles IRC wish come true (display all IRC names but non MG names are not selectable in the UI)
This commit is contained in:
@@ -480,7 +480,7 @@ void MenuStateMasterserver::mouseClick(int x, int y, MouseButton mouseButton){
|
|||||||
}
|
}
|
||||||
if(!clicked && userScrollBar.getElementCount()!=0){
|
if(!clicked && userScrollBar.getElementCount()!=0){
|
||||||
for(int i = userScrollBar.getVisibleStart(); i <= userScrollBar.getVisibleEnd(); ++i) {
|
for(int i = userScrollBar.getVisibleStart(); i <= userScrollBar.getVisibleEnd(); ++i) {
|
||||||
if(userButtons[i]->mouseClick(x, y)) {
|
if(userButtons[i]->getEnabled() == true && userButtons[i]->mouseClick(x, y)) {
|
||||||
clicked=true;
|
clicked=true;
|
||||||
if(!chatManager.getEditEnabled())
|
if(!chatManager.getEditEnabled())
|
||||||
{
|
{
|
||||||
@@ -523,9 +523,11 @@ void MenuStateMasterserver::mouseMove(int x, int y, const MouseState *ms){
|
|||||||
}
|
}
|
||||||
if(userScrollBar.getElementCount()!=0 ) {
|
if(userScrollBar.getElementCount()!=0 ) {
|
||||||
for(int i = userScrollBar.getVisibleStart(); i <= userScrollBar.getVisibleEnd(); ++i) {
|
for(int i = userScrollBar.getVisibleStart(); i <= userScrollBar.getVisibleEnd(); ++i) {
|
||||||
|
if(userButtons[i]->getEnabled() == true) {
|
||||||
userButtons[i]->mouseMove(x, y);
|
userButtons[i]->mouseMove(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -684,6 +686,13 @@ void MenuStateMasterserver::update() {
|
|||||||
button->setFont(CoreData::getInstance().getDisplayFontSmall());
|
button->setFont(CoreData::getInstance().getDisplayFontSmall());
|
||||||
button->setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
button->setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
|
||||||
button->setText(nickList[i]);
|
button->setText(nickList[i]);
|
||||||
|
if(strncmp(&nickList[i][0],"MG_",3) != 0) {
|
||||||
|
button->setEnabled(false);
|
||||||
|
button->setEditable(false);
|
||||||
|
button->setCustomTexture(CoreData::getInstance().getCustomTexture());
|
||||||
|
button->setUseCustomTexture(true);
|
||||||
|
}
|
||||||
|
|
||||||
userButtons.push_back(button);
|
userButtons.push_back(button);
|
||||||
}
|
}
|
||||||
userScrollBar.setElementCount(userButtons.size());
|
userScrollBar.setElementCount(userButtons.size());
|
||||||
|
@@ -329,9 +329,9 @@ void event_numeric(irc_session_t * session, unsigned int event, const char * ori
|
|||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> IRC: user joined channel realNick [%s] tokens[j] [%s]\n", realNick,tokens[j].c_str());
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> IRC: user joined channel realNick [%s] tokens[j] [%s]\n", realNick,tokens[j].c_str());
|
||||||
|
|
||||||
// Only show Megaglest users in the user list
|
// Only show Megaglest users in the user list
|
||||||
if(strncmp(&realNick[0],"MG_",3) == 0) {
|
//if(strncmp(&realNick[0],"MG_",3) == 0) {
|
||||||
nickList.push_back(realNick);
|
nickList.push_back(realNick);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user