mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
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.
This commit is contained in:
@ -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() {;}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -216,6 +216,8 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
|
||||
virtual void PurgeDynaTextMapImage();
|
||||
|
||||
virtual void UpdateColorScheme() { fFontFlagsSet = 0; pfGUIControlMod::UpdateColorScheme(); }
|
||||
|
||||
// Extended event types
|
||||
enum ExtendedEvents
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -455,6 +455,7 @@ void pyGUIControl::SetFontFlags(UInt8 fontFlags)
|
||||
{
|
||||
pfGUIColorScheme* colorscheme = pdmod->GetColorScheme();
|
||||
colorscheme->fFontFlags = fontFlags;
|
||||
pdmod->UpdateColorScheme();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user