|
From: Thijs v. s. <thi...@gm...> - 2017-01-29 22:23:27
|
hi all so i think i managed to set up everything to create and push an event, but i'm not quite there yet in SongEditor.cpp i have added some lines that should draw a .png (using drawPixmap) based on the bNext flag I added some debug, did lots of tests and it looks like this part of the code is executed when i expect it to, but the gui does not update at that same moment :-( i have the feeling that the actual gui update is done somewhere else, but i cant figure out how that happens all help is welcome ! grtz Thijs 2017-01-20 18:02 GMT+01:00 <ma...@sm...>: > Hi Thijs! > > Great to see that you're starting to play around with the code. > > About your gui update problem: There is a event mechanism which enables > the core of hydrogen to notify the user interface about any changes. > Have a look at pull request 460 (https://github.com/hydrogen-m > usic/hydrogen/pull/460), > it is an example of how to refresh a part of the user interface after a > midi event > has happened. > > Best regards and happy hacking, > Sebastian > > > > Am 20.01.2017 17:42, schrieb Thijs van severen: > >> Hi guys ! >> >> i have just created a ticket for an enhancement that would really make >> my life a lot easier >> (see https://github.com/hydrogen-music/hydrogen/issues/471 [1]) >> >> i'm actually trying to have a go at it, but i'm a bit stuck :-) >> >> So far i have figured out that void SongEditor::createBackground() in >> SongEditor.cpp does the actual gui update, but it seems that it is >> only called when the pattern loops >> i have no clue how i can trigger this gui update when a >> select_next_pattern midi message is recieved >> >> I have also found out that when you send a midi select_next_pattern >> message to H2 this triggers the MidiActionManager::select_next_pattern >> function in midi_actions.cpp >> if i could trigger the gui update from here i might be able to make >> this work >> >> any ideas ? >> >> grtz >> Thijs-- >> >> follow me on my Audio & Linux blog >> <http://audio-and-linux.blogspot.com/ [2]> ! >> >> >> >> Links: >> ------ >> [1] https://github.com/hydrogen-music/hydrogen/issues/471 >> [2] http://audio-and-linux.blogspot.com/ >> > -- follow me on my Audio & Linux blog <http://audio-and-linux.blogspot.com/> ! |