Changed difficulty icons on gameplay to a new design and have them use localized strings instead of baked text
This commit is contained in:
@@ -1,7 +1,66 @@
|
||||
local font = LoadFont( "_zeroesthree" );
|
||||
local frame = LoadActor( "_score frame" );
|
||||
local text = GAMESTATE:GetPlayMode() == 'PlayMode_Oni' and "time" or "score";
|
||||
|
||||
local function DifficultyLabelText(pn)
|
||||
local yNormal = SCREEN_CENTER_Y+175;
|
||||
local yReverse = SCREEN_CENTER_Y-189;
|
||||
local xNormal = 286;
|
||||
local xReverse = 310;
|
||||
|
||||
local diffText = font .. {
|
||||
InitCommand=function(self)
|
||||
-- check to see if player is using reverse and set position accordingly.
|
||||
if GAMESTATE:PlayerIsUsingModifier(pn,"reverse") then
|
||||
if pn == PLAYER_1 then
|
||||
-- player 1 reverse position
|
||||
self:x(SCREEN_CENTER_X-xReverse);
|
||||
self:y(yReverse);
|
||||
else
|
||||
-- player 2 reverse position
|
||||
self:x(SCREEN_CENTER_X+xReverse);
|
||||
self:y(yReverse);
|
||||
end;
|
||||
else
|
||||
if pn == PLAYER_1 then
|
||||
-- player 1 normal position
|
||||
self:x(SCREEN_CENTER_X-xNormal);
|
||||
self:y(yNormal);
|
||||
else
|
||||
-- player 2 normal position
|
||||
self:x(SCREEN_CENTER_X+xNormal);
|
||||
self:y(yNormal);
|
||||
end;
|
||||
end;
|
||||
|
||||
-- set align based on player
|
||||
if pn == PLAYER_1 then self:horizalign('HorizAlign_Left');
|
||||
else self:horizalign('HorizAlign_Right');
|
||||
end;
|
||||
|
||||
-- other commands
|
||||
self:zoom(0.75);
|
||||
self:shadowlength(0);
|
||||
end;
|
||||
OnCommand=cmd(playcommand,'Update');
|
||||
CurrentStepsP1ChangedMessageCommand=cmd(playcommand,'Update');
|
||||
CurrentStepsP2ChangedMessageCommand=cmd(playcommand,'Update');
|
||||
UpdateCommand=function(self)
|
||||
self:settext(DifficultyToLocalizedString(GAMESTATE:GetCurrentSteps(pn):GetDifficulty()));
|
||||
end;
|
||||
Condition=GAMESTATE:IsSideJoined(pn) == true or GAMESTATE:GetPlayMode() == 'PlayMode_Rave';
|
||||
};
|
||||
|
||||
return diffText;
|
||||
end;
|
||||
|
||||
return Def.ActorFrame {
|
||||
|
||||
-- text on difficulty labels
|
||||
DifficultyLabelText(PLAYER_1);
|
||||
DifficultyLabelText(PLAYER_2);
|
||||
|
||||
-- text on bottom of score frames
|
||||
Def.ActorFrame {
|
||||
frame;
|
||||
font .. {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -59,12 +59,12 @@ Oni=Oni
|
||||
Survival=Survival
|
||||
|
||||
[Difficulty]
|
||||
Beginner=BEGINNER
|
||||
Challenge=CHALLENGE
|
||||
Easy=LIGHT
|
||||
Edit=EDIT
|
||||
Hard=HEAVY
|
||||
Medium=STANDARD
|
||||
Beginner=Beginner
|
||||
Challenge=Expert
|
||||
Easy=Easy
|
||||
Edit=Edit
|
||||
Hard=Hard
|
||||
Medium=Medium
|
||||
|
||||
[EditInstallations]
|
||||
You must type a program directory before clicking Add.=You must type a program directory before clicking Add.
|
||||
|
||||
@@ -925,15 +925,15 @@ DifficultyP1X=
|
||||
DifficultyP1Y=
|
||||
DifficultyP1OnCommand=
|
||||
DifficultyP1OffCommand=linear,0.5;addx,-200
|
||||
DifficultyP1SetReverseCommand=x,SCREEN_CENTER_X-254;y,SCREEN_CENTER_Y-196;addx,-200;linear,0.5;addx,200;cropbottom,0;croptop,0.5
|
||||
DifficultyP1SetNoReverseCommand=x,SCREEN_CENTER_X-230;y,SCREEN_CENTER_Y+183;addx,-200;linear,0.5;addx,200;cropbottom,0.5;croptop,0
|
||||
DifficultyP1SetReverseCommand=x,SCREEN_CENTER_X-254;y,SCREEN_CENTER_Y-196;cropbottom,0;croptop,0.5;addx,-200;linear,0.5;addx,200
|
||||
DifficultyP1SetNoReverseCommand=x,SCREEN_CENTER_X-230;y,SCREEN_CENTER_Y+183;cropbottom,0.5;croptop,0;addx,-200;linear,0.5;addx,200
|
||||
|
||||
DifficultyP2X=
|
||||
DifficultyP2Y=
|
||||
DifficultyP2OnCommand=
|
||||
DifficultyP2OffCommand=linear,0.5;addx,200
|
||||
DifficultyP2SetReverseCommand=x,SCREEN_CENTER_X+254;y,SCREEN_CENTER_Y-196;addx,-200;linear,0.5;addx,200;cropbottom,0;croptop,0.5
|
||||
DifficultyP2SetNoReverseCommand=x,SCREEN_CENTER_X+230;y,SCREEN_CENTER_Y+183;addx,-200;linear,0.5;addx,200;cropbottom,0.5;croptop,0
|
||||
DifficultyP2SetReverseCommand=x,SCREEN_CENTER_X+254;y,SCREEN_CENTER_Y-196;cropbottom,0;croptop,0.5;addx,-200;linear,0.5;addx,200
|
||||
DifficultyP2SetNoReverseCommand=x,SCREEN_CENTER_X+230;y,SCREEN_CENTER_Y+183;cropbottom,0.5;croptop,0;addx,-200;linear,0.5;addx,200
|
||||
LyricsSetNoReverseCommand=x,SCREEN_CENTER_X+0;y,SCREEN_CENTER_Y+160
|
||||
LyricsSetReverseCommand=x,SCREEN_CENTER_X+0;y,SCREEN_CENTER_Y-140
|
||||
# This is used if one player is in reverse and the other isn't.
|
||||
|
||||
Reference in New Issue
Block a user