Jump to content

Czar

Members
  • Content Count

    446
  • Joined

  • Last visited

  • Days Won

    13

Reputation Activity

  1. Like
    Czar reacted to IgorSavkic in Text Editor sample?   
    You can also try Ace editor, it's being used by Jon on official SMS desktop demo, take a look here:
    https://jonlennartaasenden.wordpress.com/2016/05/14/porting-ace-to-smart-pascal/
  2. Like
    Czar reacted to lynkfs in Text Editor sample?   
    alternatively to developing it yourself
    there are quite a few editors ready to go
    like
    https://quilljs.com/docs/quickstart/
     
    maybe 
  3. Like
    Czar reacted to warleyalex in Custom library path   
    ...in the current project folder, create a folder named "resources", then move some files into this DIR. f.i let's move Smart.Core.pas to resources\Smart.Core.pas
     
    C:\myprojects ├ YOURPROJECT.sproj ├───resources │    └───www     ├───res     └───lib     └───css  
    a hackish solution I think will work for you, just edit your project  YOURPROJECT.sproj with an external text editor, ensure SmartMS.exe is not running. You have to edit manually the path in the FILE section.
    <File type="unit"> <Name>Smart.Core</Name> <Created>2016-12-14T13:32:16.015Z</Created> <Modified>2016-12-15T02:11:10.125</Modified> <Filename>resources\Smart.Core.pas</Filename> </File> Just restart SmartMS now.
  4. Like
    Czar got a reaction from jorn in Simple Maths Example   
    I have put together my first proper SMS project. It looks pretty trivial but it does have a quite a few features that are vital to what we would like to do with SMS.
     
    We currently develop and maintain a large library of maths and English exercises for kids from 5 to 15 years. Currently 99% is written in Delphi. We would like to expand online and possibly convert a significant amount of our software.
     
    In this case we have a simple exercise that talks to an infobar. The infobar handles feedback to the student and can store and retrieve data from a database.

    The infobar along the bottom is in an iframe that is separate from the exercise. The huge benefit is that we can have hundreds of exercises and only one infobar to change. The two parts talk using messaging (in beta RTL).
     
    I have made it so that the exercise scales to the window.
     
    Finally, I grouped the essential elements of the UI, in this case just the editbox and question label, onto a transparent panel. The panel is "zoomed" based on the height of the window compared to a design time norm. This means we can develop for today's monitors but if 4k and 8k monitors become the norm then the panel and its contents will expand in size.
     
    I am happy to discuss or share some code if it helps anyone with a particular issue.
     
    cheers
     
    http://numberworksnwords.com/cloud/exercise/index.html
  5. Like
    Czar got a reaction from IElite in Simple Maths Example   
    The balls are TW3IMages sandwiched between a background and a foreground image. The foreground image is a PNG with the hole 
    var FeedbackInst:= tw3image.create(self); FeedbackInst.zindex:=2; FeedbackInst.setbounds(-19,25,30,30); FeedbackInst.OnLoad:=procedure (sender:TObject) Begin w3_setstyle(FeedbackInst.Handle,'-webkit-transition','opacity 0.5s ease-in'); //webkit w3_setstyle(FeedbackInst.Handle,'transition','opacity 0.5s ease-in'); //mozilla FeedbackInst.AlphaBlend:=True; end; FeedbackInst.loadfromurl('res/ballGreen.png'); FeedbackInst.tagvalue:= CNT_MYAPP_FeedbackBalls; FeedbackInst.fxMoveBy(30,0, 0.5); So I basically create the image out of sight and then move them right. 
     
    The existing balls are set to move before the new ball is create

     
    procedure TForm1.ShiftFeedbackBalls; begin for var i := GetChildCount - 1 downto 0 do if (GetChildObject(i) is tw3image) and (GetChildObject(i).TagValue=CNT_MyApp_Feedbackballs) then begin var img := tw3image(GetChildObject(i)); img.fxmoveby(30,0,0.5); if img.Left > 190 then img.free; end; end;
  6. Like
    Czar reacted to IgorSavkic in Custom library path   
    I'm trying to organize common/shared units into one place where I keep my regular Delphi shared units.
     
    Is it possible to specify some external dir (not within SMS_InstallDir\Libraries) as library path in which SMS would search for source files?
  7. Like
    Czar reacted to lynkfs in prevent onscreen "virtual keyboard" on mobile/tablet?   
    for future reference : 3 editboxes
    1) normal editbox
    2) blurred
    3) hidden
     
    source http://www.lynkfs.com/Experiments/keyboard/keyboard.sproj
  8. Like
    Czar reacted to warleyalex in Fishfacts for SMS   
    I hopefully SmartMS adopt the HTMLComponents some day, design a simple screen like this one with the current designer was so painful.
     
     
     
    live preview
    project download
     
     
  9. Like
    Czar reacted to lynkfs in prevent onscreen "virtual keyboard" on mobile/tablet?   
    I quickly tested this on android mobile, where it prevents the virtual keyboard from appearing, even after touching the editbox.
     
    as native keyboards are handled by the os directly, there may be differences between os-types, os-versions and maybe even browsers
     
    what kind of tablets are you targeting ?
     
    if everything fails you could always put a transparent W3Panel on top ...
  10. Like
    Czar got a reaction from IElite in Simple Maths Example   
    I have put together my first proper SMS project. It looks pretty trivial but it does have a quite a few features that are vital to what we would like to do with SMS.
     
    We currently develop and maintain a large library of maths and English exercises for kids from 5 to 15 years. Currently 99% is written in Delphi. We would like to expand online and possibly convert a significant amount of our software.
     
    In this case we have a simple exercise that talks to an infobar. The infobar handles feedback to the student and can store and retrieve data from a database.

    The infobar along the bottom is in an iframe that is separate from the exercise. The huge benefit is that we can have hundreds of exercises and only one infobar to change. The two parts talk using messaging (in beta RTL).
     
    I have made it so that the exercise scales to the window.
     
    Finally, I grouped the essential elements of the UI, in this case just the editbox and question label, onto a transparent panel. The panel is "zoomed" based on the height of the window compared to a design time norm. This means we can develop for today's monitors but if 4k and 8k monitors become the norm then the panel and its contents will expand in size.
     
    I am happy to discuss or share some code if it helps anyone with a particular issue.
     
    cheers
     
    http://numberworksnwords.com/cloud/exercise/index.html
  11. Like
    Czar got a reaction from lynkfs in Simple Maths Example   
    I have put together my first proper SMS project. It looks pretty trivial but it does have a quite a few features that are vital to what we would like to do with SMS.
     
    We currently develop and maintain a large library of maths and English exercises for kids from 5 to 15 years. Currently 99% is written in Delphi. We would like to expand online and possibly convert a significant amount of our software.
     
    In this case we have a simple exercise that talks to an infobar. The infobar handles feedback to the student and can store and retrieve data from a database.

    The infobar along the bottom is in an iframe that is separate from the exercise. The huge benefit is that we can have hundreds of exercises and only one infobar to change. The two parts talk using messaging (in beta RTL).
     
    I have made it so that the exercise scales to the window.
     
    Finally, I grouped the essential elements of the UI, in this case just the editbox and question label, onto a transparent panel. The panel is "zoomed" based on the height of the window compared to a design time norm. This means we can develop for today's monitors but if 4k and 8k monitors become the norm then the panel and its contents will expand in size.
     
    I am happy to discuss or share some code if it helps anyone with a particular issue.
     
    cheers
     
    http://numberworksnwords.com/cloud/exercise/index.html
  12. Like
    Czar got a reaction from lynkfs in Centering zoomed objects   
    I was having difficulty centring a panel on the screen when zoom>1.
     
    It took me a little while to work out what was going on so I thought I would post a solution in case other people get a bit stuck on the same issue.
     
    In this example I had two panels, one zoom=1 and zoom=2
     
    It turns out that the area that you are centring on is being zoomed.
    procedure TForm1.Resize; begin inherited; panelzoom.zoom := 2; panelzoom.left := trunc(self.ClientWidth / (2*panelzoom.zoom)) - (panelzoom.width div 2); panelzoom.top := trunc(self.ClientHeight / (2*panelzoom.zoom)) - (panelzoom.Height div 2); panelnotzoom.left := (self.ClientWidth div 2) - (panelnotzoom.width div 2); panelnotzoom.top := (self.ClientHeight div 2) - (panelnotzoom.Height div 2); end;
  13. Like
    Czar got a reaction from lynkfs in 5-min using RTL_2.3   
    On the other hand we have been working with the new RTL and the desktop. We are currently building our first application and we see a bright future for SMS. Currently it is hard going, we are puzzling our way through trying to get the various aspects working.
     
    Ideally we will be wanting to "port" 20 years of Delphi software to SMS. Most of the Delphi code are exercises for maths and language teaching. This means each little module is self contained which makes life much easier when dealing with SMS.
     
    At the present time we are not 100% sure we can do it but we learn more as we build our first applications.
     
    We intend to use the desktop as the platform that will house all our other software which will make a dynamic and exciting workspace for our students. I just wish we could fund the SMS team to work on development 100% of the time
  14. Like
    Czar got a reaction from IElite in 5-min using RTL_2.3   
    On the other hand we have been working with the new RTL and the desktop. We are currently building our first application and we see a bright future for SMS. Currently it is hard going, we are puzzling our way through trying to get the various aspects working.
     
    Ideally we will be wanting to "port" 20 years of Delphi software to SMS. Most of the Delphi code are exercises for maths and language teaching. This means each little module is self contained which makes life much easier when dealing with SMS.
     
    At the present time we are not 100% sure we can do it but we learn more as we build our first applications.
     
    We intend to use the desktop as the platform that will house all our other software which will make a dynamic and exciting workspace for our students. I just wish we could fund the SMS team to work on development 100% of the time
×
×
  • Create New...