M477H13U Posted March 21, 2018 Share Posted March 21, 2018 Hello UniGUI users ! (: Basically our project is a desktop. We would like to add a ScreenMask (just the loading icon, no text) on our shortCut only when user double click these shortCut. For now, I manage to get the following rendering: with ScreenMask do begin Opacity := 0.5; Target := FuniImage; Enabled := True; ScreenMask.Message := '</br>'; WaitData := True; end; But the loading icon is not centered. How could I achieve something like that ? How could I force screenMask to be shown only on double click ? Because currently, if you click or right click, it is apparent.. Thanks for you help ! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 21, 2018 Share Posted March 21, 2018 Hi, Sorry, can you clarify your question again please, what you wanted? Make a simple testcase if possible Quote Link to comment Share on other sites More sharing options...
M477H13U Posted March 22, 2018 Author Share Posted March 22, 2018 For sure ! What we need for this ScreenMask is: Screenmask should only appear when image is double clicked No text displayed for the screen mask but only the loading icon centered like in the first image attached at this post ShortCutMASKTestCase.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 23, 2018 Share Posted March 23, 2018 Hi, Thanks for the testcase, But, here's what I think, in the first place you should not use mousedown and dblclick events simultaneously Quote Link to comment Share on other sites More sharing options...
M477H13U Posted March 27, 2018 Author Share Posted March 27, 2018 Hi! (: Ok for that matter .. but what about my second point ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 27, 2018 Share Posted March 27, 2018 Hi, Hi! (: Ok for that matter .. but what about my second point ? I will try to find a workaround Quote Link to comment Share on other sites More sharing options...
M477H13U Posted April 3, 2018 Author Share Posted April 3, 2018 Hello there ! (: Any news for this workaround ? :3 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 3, 2018 Share Posted April 3, 2018 Hi, Sorry for delay * 2.How could I force screenMask to be shown only on double click ? Because currently, if you click or right click, it is apparent.. I will try to give you a solution a bit later Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 5, 2018 Share Posted April 5, 2018 Hi, Can you try this approach?!: FUniImage 1. function afterrender(sender, eOpts) { sender.el.dom.addEventListener('contextmenu', function(e){ajaxRequest(sender, '_contextmenu', ['x='+e.layerX, 'y='+e.layerY])}); } 2. function dblclick(sender, eOpts) { if (sender.uniMask) { sender.uniMask.ldMask=true; }; } 3. procedure TMainForm.FUniImageAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_contextmenu' then begin FPopupMenu.Popup(Params.Values['x'].ToInteger(), Params.Values['y'].ToInteger(), Sender); end; end; MainForm procedure TMainForm.InternalMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin {sleep(500); if Button = mbRight then begin FPopupMenu.Popup(X, Y, Self); end} end; procedure TMainForm.InternalOpen(Sender: TObject); begin //Do stuff sleep(2000); FUniImage.JSInterface.JSCode('var me='#1'; if (me.uniMask){me.uniMask.ldMask=false};'); end; procedure TMainForm.UniFormReady(Sender: TObject); begin FUniImage.JSInterface.JSCode('var me='#1'; if (me.uniMask){me.uniMask.ldMask=false};'); end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.