mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Merge pull request #577 from SquidDev-CC/ComputerCraft/feature/get-blink
Add .getCursorBlink to monitors and terminals
This commit is contained in:
		| @@ -64,7 +64,8 @@ public class TermAPI implements ILuaAPI | |||||||
|             "setPaletteColour", |             "setPaletteColour", | ||||||
|             "setPaletteColor", |             "setPaletteColor", | ||||||
|             "getPaletteColour", |             "getPaletteColour", | ||||||
|             "getPaletteColor" |             "getPaletteColor", | ||||||
|  |             "getCursorBlink", | ||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|      |      | ||||||
| @@ -284,6 +285,9 @@ public class TermAPI implements ILuaAPI | |||||||
|                 } |                 } | ||||||
|                 return null; |                 return null; | ||||||
|             } |             } | ||||||
|  |             case 23: | ||||||
|  |                 // getCursorBlink | ||||||
|  |                 return new Object[] { m_terminal.getCursorBlink() }; | ||||||
|             default: |             default: | ||||||
|             { |             { | ||||||
|                 return null; |                 return null; | ||||||
|   | |||||||
| @@ -66,7 +66,8 @@ public class MonitorPeripheral implements IPeripheral | |||||||
|             "setPaletteColor", |             "setPaletteColor", | ||||||
|             "getPaletteColour", |             "getPaletteColour", | ||||||
|             "getPaletteColor", |             "getPaletteColor", | ||||||
|             "getTextScale" |             "getTextScale", | ||||||
|  |             "getCursorBlink", | ||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -245,8 +246,12 @@ public class MonitorPeripheral implements IPeripheral | |||||||
|                 // getTextScale |                 // getTextScale | ||||||
|                 return new Object[] { monitor.getTextScale() / 2.0 }; |                 return new Object[] { monitor.getTextScale() / 2.0 }; | ||||||
|             } |             } | ||||||
|  |             case 25: | ||||||
|  |                 // getCursorBlink | ||||||
|  |                 return new Object[] { terminal.getCursorBlink() }; | ||||||
|  |             default: | ||||||
|  |                 return null; | ||||||
|         } |         } | ||||||
|         return null; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|   | |||||||
| @@ -258,6 +258,10 @@ function create( parent, nX, nY, nWidth, nHeight, bStartVisible ) | |||||||
|         end |         end | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  |     function window.getCursorBlink() | ||||||
|  |         return bCursorBlink | ||||||
|  |     end | ||||||
|  |  | ||||||
|     local function isColor() |     local function isColor() | ||||||
|         return parent.isColor() |         return parent.isColor() | ||||||
|     end |     end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 SquidDev
					SquidDev