Logo

help with the difficulty list

登録 ログイン フォーラム戻る

ポスト #1 · 2024-09-07 03:11:24pmにポスト 10月前

Offline Wrland
Wrland Avatar Member
65 ポスト
Peru
Reg. 2020-10-24


Last updated: 2024-09-07 03:11pm
I'm creating a new difficulty list for my new theme. I don't know if I can put a cursor in the difficulty list. I tried to look for some codes from other themes but I can't find the way to put the cursor in the difficulty.
(I made in photoshop to see how it works)
https://i.imgur.com/GM296h9.png
in the ScreenSelectMusic decorations > difficulty.lua

p.s. I'm not good at making themes

current code:

if not GAMESTATE:IsCourseMode() then



local difficulties = {"Beginner", "Easy", "Medium", "Hard", "Challenge" }

for difficulty in ivalues(difficulties) do
t[#t+1] = DrawDifListItem("Difficulty_" .. difficulty);
end

t[#t+1]=Def.ActorFrame {
InitCommand=cmd(y, 157),
Def.Quad{
InitCommand=function(self)
self:diffusealpha(0)
LoadActor("cursorglow")
self:draworder(1);
GetDifListX(self, -7)
self:zoomto(183, 35)
end,
["CurrentSteps" .. ToEnumShortString(player) .. "ChangedMessageCommand"]=function(self)
self:diffusealpha(0)
self:finishtweening()
self:diffusealpha(1)

local song=GAMESTATE:GetCurrentSong()
if song then

local steps = GAMESTATE:GetCurrentSteps(player)
if steps then

local diff = steps:GetDifficulty();
local st=GAMESTATE:GetCurrentStyle():GetStepsType();
self:y( Difficulty:Reverse()[diff] * 42 )

end
end
end,
SaveCommand=function(self)
-- There's no need to make a custom function to interpret
-- StepMania's enums. The Reverse() method can be applied to any
-- enum to do that for you. That being said...
--
-- Whatever you're trying to do here, it'll always be nil because
-- your "diff" variable is always nil...
--
-- I would help you more here, but I have no idea what you're attempting.
-- So, to temporarily prevent errors, I'm just going to comment this out.

-- setenv("SaveDifficulty1P", Difficulty:Reverse()[diff]+1 );
end
}
}
end

*Questions, Comments, Concerns, Song/Chart Suggestions, request, Gossip? Hit up my PM inbox or leave a comment on the file. Happy Wonderstepping!

*if you would like to make an edit using the cut, sync, or graphics from a file of mine please feel free to do so. I just ask that you link back to either the simfile category or individual simfile. Thanks!

* If there are any issues, feel free to leave a comment or PM. I'm learning how to not take all feedback personally. Please bear with me.

why Wrland? > acronym for Wonderland, meaning attractive, fun, and even practical

ポスト #2 · 2024-09-07 08:45:21pmにポスト 10月前

Offline razorblade
razorblade Avatar Member
1,119 ポスト
Not Set
Reg. 2011-03-01


Last updated: 2024-09-07 08:56pm
paste your lua codes here https://codeshare.io/ , and get the codepaste link and paste here. Just by looking the codes via code tags is eyesore.

Edit: judging from the codes, it seems incomplete. You may rather send the lua file here instead.

ポスト #3 · 2024-09-07 09:06:57pmにポスト 10月前

Offline Wrland
Wrland Avatar Member
65 ポスト
Peru
Reg. 2020-10-24


Last updated: 2024-09-07 11:59pm
here > https://mega.nz/file/ncxVzSBC#I1Vq1zW26lP7sKfQlWRPKLki9A0vKAhljKpWRTdxRmM
*Questions, Comments, Concerns, Song/Chart Suggestions, request, Gossip? Hit up my PM inbox or leave a comment on the file. Happy Wonderstepping!

*if you would like to make an edit using the cut, sync, or graphics from a file of mine please feel free to do so. I just ask that you link back to either the simfile category or individual simfile. Thanks!

* If there are any issues, feel free to leave a comment or PM. I'm learning how to not take all feedback personally. Please bear with me.

why Wrland? > acronym for Wonderland, meaning attractive, fun, and even practical
登録 ログイン フォーラム戻る

0 User(s) Viewing This Thread (Past 15 Minutes)

©2006-2025 Zenius -I- vanisher.com -5th style- IIPrivacy Policy
Web Server: 6% · Database: 8% · Server Time: 2025-07-05 18:07:48
このページは0.004秒サーバータイム使用する。
Theme: starlight · Language: japanese
Reset Theme & Language