Massively improved Config Key/Joy Mappings screen.

Warning is dismissable now, and cursor does not start in a position that will change a setting.
New special actions added:  ClearToDefault, ReloadFromDisk, SaveToDisk, SetListMode.  Exit is a special action.
Player is prompted to save when exiting screen instead of saving after every action.
Special actions fallback on Graphics/SMC action if they don't have their own.
Moved SMC overlay to Graphics/SMC warning.
Metrics for configuring input lock time, warning autodismiss time, lines visible, and NoSetListPrompt autodismiss time.
Header row added for cursor to start on.
ScreenMapControllers2 deleted as obsolete.
BitmapText:maxwidth changed to factor the zoom of the actor into the calculation.
This commit is contained in:
Kyzentun
2014-09-04 01:23:28 -06:00
parent e3f8d272c1
commit f2fdaa0cf5
17 changed files with 574 additions and 815 deletions
+20 -27
View File
@@ -513,35 +513,28 @@ void BitmapText::UnSetDistortion()
void BitmapText::UpdateBaseZoom()
{
if( m_fMaxWidth == 0 )
{
this->SetBaseZoomX( 1 );
}
else
{
const float fWidth = GetUnzoomedWidth();
if( fWidth != 0 ) // don't divide by 0
{
// Never decrease the zoom.
const float fZoom = min( 1, m_fMaxWidth/fWidth );
this->SetBaseZoomX( fZoom );
}
// don't divide by 0
// Never apply a zoom greater than 1.
// Factor in the non-base zoom so that maxwidth will be in terms of theme
// pixels when zoom is used.
#define APPLY_DIMENSION_ZOOM(dimension_max, dimension_get, dimension_zoom_get, base_zoom_set) \
if(dimension_max == 0) \
{ \
base_zoom_set(1); \
} \
else \
{ \
const float dimension= dimension_get() / dimension_zoom_get(); \
if(dimension != 0) \
{ \
const float zoom= min(1, dimension_max / dimension); \
base_zoom_set(zoom); \
} \
}
if( m_fMaxHeight == 0 )
{
this->SetBaseZoomY( 1 );
}
else
{
const float fHeight = GetUnzoomedHeight();
if( fHeight != 0 ) // don't divide by 0
{
// Never decrease the zoom.
const float fZoom = min( 1, m_fMaxHeight/fHeight );
this->SetBaseZoomY( fZoom );
}
}
APPLY_DIMENSION_ZOOM(m_fMaxWidth, GetUnzoomedWidth, GetZoomX, SetBaseZoomX);
APPLY_DIMENSION_ZOOM(m_fMaxHeight, GetUnzoomedHeight, GetZoomY, SetBaseZoomY);
#undef APPLY_DIMENSION_ZOOM
}
bool BitmapText::StringWillUseAlternate( const RString& sText, const RString& sAlternateText ) const