Origin Scripting Language
  • Basics
    • Syntax
    • Types
    • The Execution Loop
    • Defining Variables
      • Clone Objects (=)
      • References To Objects/Variables (@=)
    • Assignment Operators
    • Local Scoping
    • Typed Variables
  • Operators
    • Mathematical Usage
      • Addition Operator (+)
      • Subtraction Operator (-)
      • Divide Operator (/)
      • Multiply Operator (*)
      • To The Power Of (^)
      • Modulo Operator (%)
    • Text Usage
    • String Concatenation Operator (+)
    • Array Operations
    • Comparative Operators
    • Logical Operators
    • Bitwise operators
    • Pipe Operator (|>)
    • Nullish Coalescing Operator (??)
  • Program Flow
    • If Statements
      • if truthy (
      • ) else if truthy (
      • ) else (
      • )
    • Switch Case
    • Iteration
    • While And Until
    • Dynamic OSL Execution
  • Arrays And Objects
    • Making Arrays Or Objects
    • Modifying An Array
    • Clone Objects And References
    • Object Operations
    • Object Property Shorthand
  • Environment
    • The Window System
    • Mouse Cursor
    • Camera
    • Sound System
    • Input Simulation
    • Running Other Languages
    • Notifications
    • Send Data Between Windows
    • Interfacing With Rightclick
    • Permissions
    • Files
      • What is a file? (in ofsf)
      • Creating Directories
      • open("file_path")
      • fileGet(int)
      • listFiles()
  • Storage
    • Save DB
    • Local DB
  • Custom Syntax
    • Commands
    • Methods
    • Functions
    • Inline
    • Lambda
    • Spread Operator
    • Typed Parameters
    • Classes
    • Promises
  • External
    • Make An Iframe App
  • Commands
    • Debugging
      • log "hello world"
      • warn "you should change this"
      • error "something went wrong"
      • void expression
    • Rendering
      • Basics
        • Color Commands
        • Color Picker
        • Modifiers
      • Draw Cursor
        • goto x y
        • set_x x
        • set_y y
        • change_x x
        • change_y y
        • change x y
        • loc a b c d
      • Elements
        • Canvas
        • Rectangle
        • Triangle
        • Icon
        • Text
        • Image
        • Input
        • Pen
        • Hitbox
        • Bar
        • Slider
      • ICN (Icon System)
        • Drawing Commands
        • Dynamic Icons
      • Clipping And Scrolling (frames)
      • 3D Rendering
  • Functions
    • Math
      • Math()
      • random(low,high)
      • min(num1,num2)
      • max(num1,num2)
      • lcm(num1,num2)
      • gcd(num1,num2)
      • sum(num1,..)
      • average(num1,..)
      • dist(x1,y1,x2,y2)
      • degtorad(angle)
      • radtodeg(angle)
      • noise(x, y, z)
      • octaveNoise(x, y, z, octaves, persistence)
    • Types
      • typeof(value)
      • symbol(name)
    • Encoding
      • encodeURIComponent(string)
      • decodeURIComponent(string)
      • btoa/atob(string)
    • function()
    • formatFileSize(bytes)
    • getGamepads()
    • import(path)
    • ouidNew()
    • parseFilePath(path)
  • Global Variables
    • Overview
    • System Information
    • User Information
    • Date and Time
    • Input State
    • Display and UI
    • Network
    • File System
  • Methods
    • Strings
      • .padStart(num,val)
      • .padEnd(num,val)
      • .startsWith(val)
      • .endsWith(val)
      • .wrapText(characters)
      • .trimText(characters)
      • .split(characters)
      • .count(val)
      • .replace(old,new)
      • .replaceFirst(old,new)
      • .oslTokenise()
      • .strip()
      • .toOrdArray()
      • .match(pattern)
      • Encoding
        • .encodeBin()
        • .decodeBin()
        • .encodeHex()
        • .decodeHex()
        • .encodeUTF16()
        • .decodeUTF16()
        • .encrypt(password)
        • .decrypt(password)
        • .ord()
        • .chr()
      • Hashing
        • .hashMD5()
        • .hashSHA1()
        • .hashSHA256()
        • .hashSHA512()
      • Case
        • .toLower()
        • .toUpper()
        • .toMixed()
        • .toTitle()
    • Keyboard
      • .isKeyDown()
      • .onKeyDown()
    • Utilities
      • .len
      • .not
      • .ask()
      • .reverse()
      • .first()
      • .last()
      • .append(val)
      • .prepend(val)
      • .insert(location,val)
      • .delete(location)
      • .concat(val)
      • .trim(idx1,idx2)
      • .left(num)
      • .right(num)
      • .contains(val)
      • .index(val)
    • Maths
      • .abs()
      • .invabs()
      • .log()
      • .ln()
      • .isPrime()
      • .sqrt()
      • .sign()
      • .chance()
      • .clamp(low,high)
      • .toBase(base)
      • Rounding
        • .round(places)
        • .ceiling()
        • .floor()
      • Trigonometry
        • .sin
        • .cos
        • .tan
        • .asin()
        • .acos()
        • .atan()
        • .radSin()
        • .radCos()
    • Iframes
      • .iframeNew()
      • .iframeGoto()
      • .iframeResize()
      • .iframeRedirect()
      • .iframeShow()
      • .iframeHide()
      • .iframeClose()
    • JSON
      • Arrays
        • .pop()
        • .shift()
        • .randomOf()
        • .sort(direction)
        • .sortBy(key,direction)
        • .swap(idx1,idx2)
        • .fill(value)
        • .join(characters)
        • .map(callback)
        • .filter(callback)
        • .some(callback)
        • .every(callback)
      • Objects
        • .getKeys(keys)
        • .getValues()
      • .JsonStringify()
      • .JsonParse()
      • .JsonFormat()
      • .JsonClean()
    • Types
      • .getType()
      • .isType(type)
      • .toNum()
      • .toBool()
      • .toStr()
    • Functions
      • .bind(context)
    • Networking
      • .httpGet()
      • .http(method,data,headers)
      • .getAsync()
      • .roturConnect()
      • .roturSend(msg,target)
      • Websockets
        • .newWebsocket()
        • .wsSend(msg)
        • .wsClose()
        • .wsOpen()
        • .wsHasnew()
        • .wsGetnext()
        • .wsGetcount()
    • Timestamp
      • .timestamp("convert-date")
      • .timestamp("component")
Powered by GitBook
On this page
  • Cursor Styles
  • Basic Cursor Styles
  • Extended Cursor Styles
  • Lock
  • Unlock
  • Hide

Was this helpful?

Edit on GitHub
  1. Environment

Mouse Cursor

Cursor Styles

In originOS scripting, the cursor commands allow you to control the appearance and behavior of the cursor within the graphical user interface. The cursor can represent different states or styles, enhancing the user experience. Here are the available cursor commands:

Basic Cursor Styles

Sets the cursor to the default style, typically an arrow. Use Case: Resets the cursor to its standard appearance.

cursor "default"

Sets the cursor to a pointer style, indicating that an element is clickable or interactive. Use Case: Ideal for UI elements like buttons or links.

cursor "pointer"

Indicates that the cursor is in move mode, allowing users to drag or move elements. Use Case: Useful when dragging elements within the interface.

cursor "move"

Sets the cursor to a grabbing hand, indicating the intention to grab or move an object. Use Case: Enhances the visual feedback during drag-and-drop interactions.

cursor "grab"

Displays a grabbing hand, indicating an active grab or move action. Use Case: Provides real-time feedback during dragging operations.

cursor "grabbing"

Sets the cursor to a text input style, typically a vertical I-beam. Use Case: Indicates the cursor is ready for text input.

cursor "text"

Sets the cursor to a vertical text input style, useful for vertical text input areas. Use Case: Specifies the cursor style for vertical text entry.

cursor "vertical-text"

Displays an hourglass or spinning wheel, indicating that the system is processing. Use Case: Provides feedback during loading or processing tasks.

cursor "wait"

Sets the cursor to a spinning wheel or hourglass, indicating that a process is ongoing. Use Case: Conveys a sense of progress or loading.

cursor "progress"

Extended Cursor Styles

Displays a question mark, indicating that help or information is available. Use Case: Suggests that additional information is accessible.

cursor "help"

Sets the cursor to a context menu style, indicating that a context menu is available. Use Case: Provides visual feedback for right-click or context menu interactions.

cursor "context-menu"

Indicates that the cursor is in zoom-in mode, suggesting the ability to zoom in. Use Case: Used for interfaces where zooming in is a supported action.

cursor "zoom-in"

Indicates that the cursor is in zoom-out mode, suggesting the ability to zoom out. Use Case: Used for interfaces where zooming out is a supported action.

cursor "zoom-out"

Sets the cursor to a crosshair, often used for precision targeting or drawing applications. Use Case: Provides a visual reference for precise actions.

cursor "crosshair"

Displays a cell or box, indicating a selection or highlighting a specific area. Use Case: Used in spreadsheet-like interfaces for cell selection.

cursor "cell"

Displays a circle with a line through it, indicating that the action is not allowed. Use Case: Provides a visual cue that a particular action is restricted.

cursor "not-allowed"

Sets the cursor to a copy style, indicating the ability to copy content. Use Case: Used in interfaces where copying content is a supported action.

cursor "copy"

Displays an alias symbol, suggesting an alias or alternative representation. Use Case: Provides visual feedback for alias-related interactions.

cursor "alias"

Indicates that dropping is not allowed, often displayed during drag-and-drop operations. Use Case: Visualizes that dropping an object in the current location is prohibited.

cursor "no-drop"

Sets the cursor to an all-scroll style, suggesting that the entire content can be scrolled. Use Case: Used in interfaces where vertical and horizontal scrolling is supported.

cursor "all-scroll"

Resize a row

cursor "row-resize"

Resize a column

cursor "col-resize"

Resize Cardinal Directions

// single direction
cursor "n-resize" // up
cursor "e-resize" // right
cursor "s-resize" // bottom
cursor "w-resize" // left

// two ways
cursor "ew-resize" // left right
cursor "ns-resize" // up down

// diagonals
cursor "ne-resize" // right up
cursor "nw-resize" // left up
cursor "se-resize" // right down
cursor "sw-resize" // left down

// two way diagonals
cursor "nesw-resize" // right up, left down
cursor "nwse-resize" // left up, right down

Lock

  • Locks the cursor, preventing it from moving freely across the screen.

  • Use Case: Useful when you want to restrict cursor movement during specific UI interactions or gameplay elements.

cursor "lock"

Unlock

  • Unlocks the cursor, allowing it to move freely again.

  • Use Case: Used to release the cursor from a locked state.

cursor "unlock"

Hide

  • Hides the cursor from view.

  • Use Case: Often used during specific UI interactions where the cursor's visibility is not required.

cursor "hide"

Now you have a comprehensive set of cursor commands to enhance the visual feedback and user interactions in your originOS applications. Choose the appropriate cursor styles and commands based on the specific context and requirements of your interface or game.

PreviousThe Window SystemNextCamera

Last updated 7 months ago

Was this helpful?