Skip to content

Instantly share code, notes, and snippets.

View TheCire's full-sized avatar

TheCire TheCire

  • Earth
View GitHub Profile
@TheCire
TheCire / mouse drag.gd
Last active September 15, 2018 00:27
How should i get mouse dragged to work?
func _input(event):
if self.mouse_in_grid && !mouse_has_entered:
emit_signal("mouse_entered")
if !self.mouse_in_grid && mouse_has_entered:
emit_signal("mouse_exited")
if should_ignore_mouse || !self.mouse_in_grid:
return
if event is InputEventMouseButton:
void HideCraftingPanels(){
for(var i = 1; i < 7; i++) {
HideCraftingPanel("CraftItemsPanel" + i.ToString());
}
}
public void ShowCraftPanel(int panelNumber ){
HideCraftingPanels();
ShowCraftingPanel("CraftItemsPanel" + panelNumber.ToString());
}
enum BoxSize {
case small
case medium
case large
func value() -> CGFloat {
switch self {
case .small: return 1.0
case .medium: return 2.0
case .large: return 3.0
@TheCire
TheCire / asdf.js
Last active February 8, 2016 09:28
<button type="button" class="btn btn-default" onclick="setText(this, $('pf'));">Mr.</button>
<button type="button" class="btn btn-default" onclick="$('#pf').val($(this).html());">Mrs.</button>
{
"veterans":[
{
"thumb": "",
"web": "",
"original": "",
"caption": ""
}
]
}
@TheCire
TheCire / gist:2651526
Created May 10, 2012 06:51
JSON values
[
{
"x1":0.0,
"y1":0.0,
"x2":0.125,
"y2":0.125
},
{
"x1":0.125,
"y1":0.0,
#!/etc/bin/ruby
for 1..100 |number|
if number mod 15 == 0 then
print "FizzBuzz"
else if number mod 5 == 0 then
print "Fizz"
else if number mod 3 == 0 then
print "Bizz"
else