Adding modding folder with a hacked build.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package gui
|
||||
|
||||
// ModalStateWrapper is a wrapper over a series of modal popup states.
|
||||
// It implements both ModalState and ModalStateMachine to allow nested states, if necessary.
|
||||
type ModalStateWrapper struct {
|
||||
State ModalState
|
||||
}
|
||||
|
||||
// SetState sets the new state.
|
||||
func (machine *ModalStateWrapper) SetState(state ModalState) {
|
||||
machine.State = state
|
||||
}
|
||||
|
||||
// Render renders the current state.
|
||||
func (machine *ModalStateWrapper) Render() {
|
||||
if machine.State != nil {
|
||||
machine.State.Render()
|
||||
}
|
||||
}
|
||||
|
||||
// HandleFiles forwards the given filenames to the current state.
|
||||
func (machine *ModalStateWrapper) HandleFiles(filenames []string) {
|
||||
handler, isHandler := machine.State.(FileHandler)
|
||||
if !isHandler {
|
||||
return
|
||||
}
|
||||
handler.HandleFiles(filenames)
|
||||
}
|
||||
Reference in New Issue
Block a user