MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / currentlyPlayingMouseDown

Function currentlyPlayingMouseDown

src/OpenLoco/src/Ui/Windows/MusicJukebox.cpp:196–213  ·  view source on GitHub ↗

0x004C0875

Source from the content-addressed store, hash-verified

194
195 // 0x004C0875
196 static void currentlyPlayingMouseDown(const Window& self)
197 {
198 auto tracks = Jukebox::makeSelectedPlaylist();
199
200 auto& dropdown = self.widgets[Widx::currently_playing];
201 Dropdown::show(self.x + dropdown.left, self.y + dropdown.top, dropdown.width() - 4, dropdown.height(), self.getColour(WindowColour::secondary), tracks.size(), 0x80);
202
203 int index = -1;
204 for (auto track : tracks)
205 {
206 index++;
207 Dropdown::add(index, StringIds::dropdown_stringid, Jukebox::getMusicInfo(track).titleId);
208 if (track == Jukebox::getCurrentTrack())
209 {
210 Dropdown::setItemSelected(index);
211 }
212 }
213 }
214
215 // 0x004C09F8
216 static void currentlyPlayingDropdown(Window& self, int16_t ax)

Callers 1

onMouseDownFunction · 0.85

Calls 9

makeSelectedPlaylistFunction · 0.85
showFunction · 0.85
getCurrentTrackFunction · 0.85
setItemSelectedFunction · 0.85
getColourMethod · 0.80
addFunction · 0.50
widthMethod · 0.45
heightMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected