Colludium's Recent Forum Activity

  • Alrighty, so your code doesn't completly remove right clicking and mine does?

    That's correct - it permits right-click cut/copy/paste actions only. All other right-click context menus are prevented.

  • I'm not a JS expert so I let you be the judge, is my code more effecient or yours?

    The code I use:

    "document.addEventListener('contextmenu', function(e){e.preventDefault();}, false);"[/code:ummrm5zk]
    

    That only works if you don't want to have a Cut / Copy / Paste option by using a right click. Both sets of code are valid with different objectives.

  • Please consider adding this method of replacing the terrible right-click context menu (when you right-click on textbox and forms) with one that permits Cut / Copy / Paste methods:

    Browser Execute Javascript:

    "var gui = require('nw.gui');
      
      var menu = new gui.Menu;
      
      menu.append(new gui.MenuItem({
        label: 'Cut',
        click: function() {
          document.execCommand('cut');
        }
      }));
      
      menu.append(new gui.MenuItem({
        label: 'Copy',
        click: function() {
          document.execCommand('copy');
        }
      }));
      
      menu.append(new gui.MenuItem({
        label: 'Paste',
        click: function() {
          document.execCommand('paste');
        }
      }));
      
      document.addEventListener('contextmenu', function(e) {
        e.preventDefault();
        if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target.isContentEditable) {
          menu.popup(e.x, e.y);
        }
      });"[/code:1ob7b4x0]
    
    Sourced from [url=https://github.com/b1rdex/nw-contextmenu]here[/url] and works like a champ.
  • Problem Description

    After editing a text object, the error message listed below occurred during a manual save.

    Attach a Capx

    N/A.

    Description of Capx

    N/A

    Steps to Reproduce Bug

      N/A Observed Result [quote:e5p415lp]--------------------------- Construct 2 Check failure --------------------------- Check failure! This is probably a bug: No property changed handler available when editing property Condition: false File: Bars\PropertiesBar.cpp Line: 768 Function: void __cdecl CPropertiesBar::OnItemEdited(class CBCGPProp *,bool) Build: release 241 (64-bit) checked Component: Construct 2 IDE (Last Win32 error: 0) You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally. Expected Result N/A Affected Browsers
        N/A

    Operating System and Service Pack

    W10 x64

    Construct 2 Version ID

    r241 64 bit

  • ....I figured it out by using "SET CSS - overflow-y" with "hidden"

    for anyone that might have the same issue.

    Good advice - I'm not a css guru by any stretch. Here's a w3schools playit demo of the various options that are available.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Set CSS style "cursor" to "none" will remove the system cursor when it is over the text box. To remove the scroll bar, set "Type" to "Text" in the c2 object properties.

  • It cannot fall because of the collision check algorithm within the plugin. Any floating point x position that puts the left or right bounding box corners over a Solid and the platform object cannot fall.

  • Cheers, Unconnected!

  • Colludium that's amazing. Great plugin.

    Thank you. It was a good learning experience and solved a problem I had at the same time!

  • You need my Not Quite Random plugin,

  • on function "rgbText"

    --- set return value to rgb(int(mid(tokenat(function.parameter(0), 0, ","), 4, 3)), int(tokenat(function.parameter(0), 1, ",")), int(tokenat(function.parameter(0), 2, ",")))

    Hi R0J0hound, - thanks - I see... I guess that's the way to go. No biggie in logic terms, but the editor still seems unhappy with some entry params. Perhaps this way of handling text colour is easy enough, so it might be worth an entry in the manual to save future frustrations.... Cheers.

  • Problem Description

    OK... This might be a bug or it could be a feature request to alter apparently inconsistent editor behaviour, and an associated limitation this causes if you try and alter text object font colour by using variables.

    The problem here occurs if you try and use variables to define the colour of the text. This appears to be impossible and, if you try, the editor either rejects your attempts or accepts your input but then nothing changes when the layout is run.

    Attach a Capx

    capx

    Description of Capx

    One sprite with a string variable "rgb(255,255,0)", one global string of the same value, and one text object. On start of layout, the colour of the text font is altered by applying the value >rgb(255,255,0)<.

    Steps to Reproduce Bug

    • If you run the layout then the text object font colour is changed.
    • Place the global variable in the set font colour action. This is accepted by the editor, but when you run the layout the font colour is not changed.
    • Place the Sprite object variable in the set font colour action. This is rejected by the editor, even though it is a string (like the global variable).

    Observed Result

    As above.

    Expected Result

    I expected a text set colour action could be defined by the input of a string, allowing full control by variables.

    Affected Browsers

    • N/A

    Operating System and Service Pack

    W10 x64

    Construct 2 Version ID

    r241 64 bit

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies