Added character name input to class selection window, removed "file save name" dialog from main menu navigation. Fixed scaling for button labels with different values than 1. Moved ScrollableWindowComponent's scrollbar to be lined up with the actual scrollbar arrows. Removed text entry mode from blocking controller / gamepad inputs.
This commit is contained in:
@@ -70,8 +70,6 @@ public:
|
||||
if(playTime==-1){
|
||||
window.DrawShadowStringPropDecal(rect.pos+vf2d{2,2},"UNKNOWN");
|
||||
}else{
|
||||
window.DrawShadowStringPropDecal(rect.pos+vf2d{2,2},saveFileName);
|
||||
|
||||
const std::map<std::string,std::string>classAnimations={
|
||||
{Warrior::name,Warrior::walk_s},
|
||||
{Ranger::name,Ranger::walk_s},
|
||||
@@ -85,6 +83,16 @@ public:
|
||||
vf2d chapterTextSize=game->GetTextSize(chapterText);
|
||||
window.DrawShadowStringDecal(rect.pos+vf2d{rect.size.x-chapterTextSize.x-2,2},chapterText);
|
||||
|
||||
|
||||
vf2d saveFileNameSize=game->GetTextSizeProp(saveFileName);
|
||||
float spaceAvailable=rect.size.x-chapterTextSize.x-8;
|
||||
float scaleRatio=1.f;
|
||||
if(saveFileNameSize.x>spaceAvailable){
|
||||
scaleRatio=spaceAvailable/saveFileNameSize.x;
|
||||
}
|
||||
|
||||
window.DrawShadowStringPropDecal(rect.pos+vf2d{2,2},saveFileName,WHITE,BLACK,vf2d{scaleRatio,1.f});
|
||||
|
||||
const Animate2D::Frame&frame=ANIMATION_DATA[classAnimations.at(className)].GetFrame(animationTime);
|
||||
geom2d::rect<int>sprRect=frame.GetSourceRect();
|
||||
window.DrawPartialDecal(rect.pos+vf2d{rect.size.x-26,rect.size.y-36},sprRect.size,frame.GetSourceImage()->Decal(),sprRect.pos,sprRect.size);
|
||||
|
||||
Reference in New Issue
Block a user