Browse Source

Fix ptGUIControl.setFontFlags().

Previous revision didn't work, many controls retained their shadows because they never got the new flags from the color scheme and put them into the dynamic text map. I haven't checked if any more of the many control classes are affected, but those that we need in the KI right now are covered.
textrendering
Christian Walther 11 years ago
parent
commit
c0b63e4237
  1. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.h
  2. 4
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp
  3. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.h
  4. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h
  5. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIControlMod.h

@ -247,6 +247,8 @@ class pfGUIControlMod : public plSingleModifier
virtual void SetColorScheme( pfGUIColorScheme *newScheme );
pfGUIColorScheme *GetColorScheme( void ) const;
virtual void UpdateColorScheme() { IPostSetUpDynTextMap(); IUpdate(); }
// should be override by specific GUIcontrol
virtual void PurgeDynaTextMapImage() {;}

4
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIListBoxMod.cpp

@ -180,6 +180,10 @@ hsBool pfGUIListBoxMod::MsgReceive( plMessage *msg )
void pfGUIListBoxMod::IPostSetUpDynTextMap( void )
{
pfGUIColorScheme *scheme = GetColorScheme();
fDynTextMap->SetFont( scheme->fFontFace, scheme->fFontSize, scheme->fFontFlags,
HasFlag( kXparentBgnd ) ? false : true );
ICalcWrapStarts();
ICalcScrollRange();
fReadyToRoll = true;

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIMultiLineEditCtrl.h

@ -216,6 +216,8 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
virtual void PurgeDynaTextMapImage();
virtual void UpdateColorScheme() { fFontFlagsSet = 0; pfGUIControlMod::UpdateColorScheme(); }
// Extended event types
enum ExtendedEvents
{

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUITextBoxMod.h

@ -102,8 +102,6 @@ class pfGUITextBoxMod : public pfGUIControlMod
void SetLocalizationPath(const wchar_t* path);
void SetLocalizationPath(const char* path);
void SetUseLocalizationPath(bool use);
virtual void UpdateColorScheme() { IPostSetUpDynTextMap(); IUpdate(); }
};
#endif // _pfGUITextBoxMod_h

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp

@ -455,6 +455,7 @@ void pyGUIControl::SetFontFlags(UInt8 fontFlags)
{
pfGUIColorScheme* colorscheme = pdmod->GetColorScheme();
colorscheme->fFontFlags = fontFlags;
pdmod->UpdateColorScheme();
}
}
}

Loading…
Cancel
Save